Executing entire sysupgrade as sudo.

This commit is contained in:
Faerbit 2016-07-13 11:31:25 +02:00
parent 10c2606b4a
commit 58068da93c
2 changed files with 4 additions and 3 deletions

View File

@ -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
}

1
zshrc
View File

@ -47,6 +47,7 @@ alias n='ninja'
alias cmake='cmake -G Ninja'
alias wlan='sudo netctl-auto list'
alias adb-connect='adb connect 192.168.1.138:5555'
alias sysupgrade='sudo _sysupgrade'
if test -f "$(which nvim)"
then
alias v='nvim'