Making sysupgrade available for all platforms.

This commit is contained in:
Faerbit 2015-12-05 09:27:51 +01:00
parent a75eb02c36
commit d7840b0eaf

View File

@ -3,10 +3,10 @@ twitch() {
} }
sysupgrade(){ sysupgrade(){
old_kernel=$(pacman -Q linux-raspberrypi | awk '{print $2 }') old_kernel=$(pacman -Q linux-raspberrypi 2>/dev/null | awk '{print $2 }')
sudo pacmatic -Syu sudo pacmatic -Syu
new_kernel=$(pacman -Q linux-raspberrypi | awk '{print $2 }') new_kernel=$(pacman -Q linux-raspberrypi 2>/dev/null | awk '{print $2 }')
if [[ $old_kernel != $new_kernel ]] if [[ $old_kernel != $new_kernel && $(uname -m) == 'armv7l' ]]
then then
sudo mkinitcpio -k "$new_kernel-ARCH" -g /boot/initrd sudo mkinitcpio -k "$new_kernel-ARCH" -g /boot/initrd
fi fi