diff --git a/zsh_functions b/zsh_functions index 131c88f..9b50929 100644 --- a/zsh_functions +++ b/zsh_functions @@ -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 } diff --git a/zshrc b/zshrc index 6c834b6..c7d6e74 100644 --- a/zshrc +++ b/zshrc @@ -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'