I'm working on a bash-script that downloads, compiles, installs, and does stuff for the latest love-sources.
It only works for test-kernels because I'm lazy and don't want to add various heuristics to determine which kind of kernel. If you find any errors, tell me, because I'm no programmer.
Code: Select all
#!/bin/bash
#lovebuild.sh-Downloads, builds, installs love-sources (valid for test kernels only).
#Takes test num. and love num. as arguments.
cd /usr/local/portage/sys-kernel/love-sources
echo 'Downloading and digesting ebuild.'
wget http://bssteph.irtonline.org/linux/patches/2.6/2.6.0-test${1}/2.6.0-test${1}-love${2}/love-sources-2.6.0_beta${1}-r${2}.ebuild || exit
ebuild love-sources-2.6.0_beta${1}-r${2}.ebuild digest || exit
echo 'Emerging ebuild.'
emerge love-sources || exit
echo 'Configuring and compiling.'
cd /usr/src/linux-2.6.0-test${1}-love${2}/
zcat /proc/config.gz > .config
make xconfig || exit
make
make modules_install
mount /boot || true
Xdialog --msgbox 'Error!' 5 15
make install || true
echo 'Relinking, emerging nvidia-kernel.'
rm /usr/src/linux
ln -s /usr/src/linux-2.6.0-test${1}-love${2}/ /usr/src/linux
emerge nvidia-kernel || exit
echo 'Done.'
Xdialog --msgbox 'All done!' 5 15
It's used like this:
lovebuild.sh 9 4 (the two numbers being the test kernel number and the love release number, respectively).
It DOES NOT work right now, because of the patching problem, but hopefully bssteph will fix that soon.
It contains some stuff specific to my machine:
The xdialog 'error' message is used because make-install doesn't detect grub on my machine and stops, asking me to make a bootdisk.
The message notifies me to press 'n'.
Nvidia-kernel, of course, only for nvidia users.
It requires Xdialog (emerge xdialog) and /proc/config.gz to be present, but it's not strictly necessary.
Change '/usr/local/portage' to your overlay directory.
Also, /boot is a separate partition for me, and if yours isn't, then remove the 'mount /boot' line.
Also, it's not fully automated/noninteractive at all.
Tell me of anything I can do to improve it.