build/bin/bump_nvidia_drivers

24 lines
824 B
Plaintext
Raw Permalink Normal View History

2011-07-14 22:05:05 +02:00
#!/bin/sh
. /sabayon/bin/kernels.inc
2011-11-13 21:20:38 +01:00
packages="x11-drivers/nvidia-drivers::sabayon-distro"
2011-07-14 22:05:05 +02:00
# build for latest kernel
2011-11-13 21:20:38 +01:00
KERNEL_DIR="/usr/src/linux-${running_kernel}" emerge $packages media-video/nvidia-settings::sabayon-distro
2011-07-14 22:05:05 +02:00
echo -5 | etc-update
eit commit
2011-07-14 22:05:05 +02:00
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; }
2011-07-14 22:05:05 +02:00
built_pkgs=$(find /usr/portage/packages -name "*.tbz2" | xargs echo)
[[ -z "${built_pkgs}" ]] && echo "ouch no kernel pkgs" && exit 2
eit inject ${built_pkgs} || { echo "ouch unable to inject" && exit 3; }
2011-07-14 22:05:05 +02:00
echo
done
echo "Now you should remove old packages..."