Executing entire sysupgrade as sudo.
This commit is contained in:
parent
10c2606b4a
commit
58068da93c
@ -2,13 +2,13 @@ twitch() {
|
||||
livestreamer "twitch.tv/$1" &
|
||||
}
|
||||
|
||||
sysupgrade(){
|
||||
_sysupgrade(){
|
||||
old_kernel=$(pacman -Q linux-raspberrypi 2>/dev/null | awk '{print $2 }')
|
||||
sudo pacmatic -Syu
|
||||
pacmatic -Syu
|
||||
new_kernel=$(pacman -Q linux-raspberrypi 2>/dev/null | awk '{print $2 }')
|
||||
if [[ $old_kernel != $new_kernel && $(uname -m) == 'armv7l' ]]
|
||||
then
|
||||
sudo mkinitcpio -k "$new_kernel-ARCH" -g /boot/initrd
|
||||
mkinitcpio -k "$new_kernel-ARCH" -g /boot/initrd
|
||||
fi
|
||||
cower -u
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user