summaryrefslogtreecommitdiff
path: root/bin/bump_kernel_package_inject
blob: 8948cf2bac0f7e0dc1b85a369f0d2d1b858c81a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

. /kogaion/bin/kernels.inc

if [ "${#}" -lt 1 ]; then
	echo "${0} <package> <package> ..." >&2 /dev/null
	echo "example: ${0} net-wireless/broadcom-sta" >&2 /dev/null
	exit 1
fi

for kernel in ${kernels}; do
        rm -rf /usr/portage/packages/*
        KERNEL_DIR="/usr/src/linux-${kernel}" emerge -B "${@}" || { echo "ouch unable to build" && exit 1; }
        built_pkgs=$(find /usr/portage/packages -name "*.tbz2" | xargs)
        [[ -z "${built_pkgs}" ]] && echo "ouch no kernel pkgs" && exit 2
        eit inject ${built_pkgs} || { echo "ouch unable to inject" && exit 3; }
done