Executing entire sysupgrade as sudo.
This commit is contained in:
parent
10c2606b4a
commit
58068da93c
@ -2,13 +2,13 @@ twitch() {
|
|||||||
livestreamer "twitch.tv/$1" &
|
livestreamer "twitch.tv/$1" &
|
||||||
}
|
}
|
||||||
|
|
||||||
sysupgrade(){
|
_sysupgrade(){
|
||||||
old_kernel=$(pacman -Q linux-raspberrypi 2>/dev/null | awk '{print $2 }')
|
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 }')
|
new_kernel=$(pacman -Q linux-raspberrypi 2>/dev/null | awk '{print $2 }')
|
||||||
if [[ $old_kernel != $new_kernel && $(uname -m) == 'armv7l' ]]
|
if [[ $old_kernel != $new_kernel && $(uname -m) == 'armv7l' ]]
|
||||||
then
|
then
|
||||||
sudo mkinitcpio -k "$new_kernel-ARCH" -g /boot/initrd
|
mkinitcpio -k "$new_kernel-ARCH" -g /boot/initrd
|
||||||
fi
|
fi
|
||||||
cower -u
|
cower -u
|
||||||
}
|
}
|
||||||
|
1
zshrc
1
zshrc
@ -47,6 +47,7 @@ alias n='ninja'
|
|||||||
alias cmake='cmake -G Ninja'
|
alias cmake='cmake -G Ninja'
|
||||||
alias wlan='sudo netctl-auto list'
|
alias wlan='sudo netctl-auto list'
|
||||||
alias adb-connect='adb connect 192.168.1.138:5555'
|
alias adb-connect='adb connect 192.168.1.138:5555'
|
||||||
|
alias sysupgrade='sudo _sysupgrade'
|
||||||
if test -f "$(which nvim)"
|
if test -f "$(which nvim)"
|
||||||
then
|
then
|
||||||
alias v='nvim'
|
alias v='nvim'
|
||||||
|
Loading…
Reference in New Issue
Block a user