mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 02:01:08 +00:00
update.sh: stop running if error when updating/cleaning
This commit is contained in:
parent
7c8be4432a
commit
00a0ebe0f8
@ -14,15 +14,18 @@ bold "Pacman-mirrors -c"
|
|||||||
s "pacman-mirrors -c Brazil" 2>/dev/null
|
s "pacman-mirrors -c Brazil" 2>/dev/null
|
||||||
s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist" 2>/dev/null
|
s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist" 2>/dev/null
|
||||||
|
|
||||||
|
# From now on, exit when any command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
s -v
|
s -v
|
||||||
bold "Updating..."
|
bold "Updating..."
|
||||||
yay -Syu --sudoloop --noconfirm --nobatchinstall --cleanafter
|
yay -Syu --sudoloop --noconfirm --nobatchinstall --cleanafter
|
||||||
|
|
||||||
bold "Cleaning stuff..."
|
bold "Cleaning stuff..."
|
||||||
s -v
|
s -v
|
||||||
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always 2>/dev/null)
|
|
||||||
s -v
|
|
||||||
yay -Sc --noconfirm 2>/dev/null
|
yay -Sc --noconfirm 2>/dev/null
|
||||||
|
s -v
|
||||||
|
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always 2>/dev/null)
|
||||||
|
|
||||||
s -k
|
s -k
|
||||||
notify-send "Update script has finished!"
|
notify-send "Update script has finished!"
|
||||||
|
Loading…
Reference in New Issue
Block a user