Created
July 13, 2012 18:43
-
-
Save sofar/3106588 to your computer and use it in GitHub Desktop.
installkernel - preserve vmlinuz-
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. /etc/lunar/config | |
preserve() | |
{ | |
if [ -f $1 ] ; then | |
mv -f $1 $1.old | |
fi | |
} | |
# make backups | |
preserve $4/vmlinuz-$1 | |
preserve $4/System.map-$1 | |
preserve $4/config.$1 | |
make modules_install | |
# bzImage | |
cp $2 $4/vmlinuz-$1 | |
# System.map | |
cp $3 $4/System.map-$1 | |
# save config as .gz | |
cp .config $4/config.$1 | |
gzip -f $4/config.$1 | |
# and update bootloader | |
update_bootloader vmlinuz-$1 $1 | |
[ $? == 2 ] && true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just needs a . $BOOTSTRAP at the top now as well.