29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
kernels="2.6.36-sabayon 2.6.37-sabayon 2.6.38-sabayon 2.6.39-sabayon"
|
||
|
running_kernel="2.6.39-sabayon"
|
||
|
packages="x11-drivers/nvidia-drivers::sabayon"
|
||
|
|
||
|
# build for latest kernel
|
||
|
KERNEL_DIR="/usr/src/linux-${running_kernel}" emerge $packages media-video/nvidia-settings::sabayon
|
||
|
echo -5 | etc-update
|
||
|
reagent update
|
||
|
|
||
|
for kernel in $kernels; do
|
||
|
if [ "${kernel}" = "${running_kernel}" ]; then
|
||
|
continue
|
||
|
fi
|
||
|
rm -rf /usr/portage/packages/*
|
||
|
KERNEL_DIR="/usr/src/linux-${kernel}" emerge -B ${packages} || ( echo "ouch unable to build" && exit 1 )
|
||
|
built_pkgs=$(find /usr/portage/packages -name "*.tbz2" | xargs echo)
|
||
|
[[ -z "${built_pkgs}" ]] && echo "ouch no kernel pkgs" && exit 2
|
||
|
reagent inject ${built_pkgs} || ( echo "ouch unable to inject" && exit 3 )
|
||
|
echo
|
||
|
reagent query tags ${kernel} -qv | sort
|
||
|
echo
|
||
|
done
|
||
|
|
||
|
echo "Now you should remove old packages:"
|
||
|
echo reagent repo remove `reagent query search ${packages} -qv | grep MY_OLD_VER | xargs echo`
|
||
|
echo
|