From 7c8be4432ade6818bb8721c39c3f7b0d5f4a6b08 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Wed, 21 Apr 2021 18:03:22 -0300 Subject: [PATCH] update.sh: has fewer unecessary error messages --- Pacman/updateRepositories.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Pacman/updateRepositories.sh b/Pacman/updateRepositories.sh index cef8f1b..3cbe4f7 100755 --- a/Pacman/updateRepositories.sh +++ b/Pacman/updateRepositories.sh @@ -2,29 +2,27 @@ BOLD='\e[91m' NC='\e[39m' function bold() { - echo -e "${BOLD}$1${NC}" + echo -e "\n\n${BOLD}$1${NC}" } function s() { - sudo $1 - echo + sudo $* } s -v bold "Pacman-mirrors -c" -s "pacman-mirrors -c Brazil" -s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist" +s "pacman-mirrors -c Brazil" 2>/dev/null +s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist" 2>/dev/null s -v -echo bold "Updating..." yay -Syu --sudoloop --noconfirm --nobatchinstall --cleanafter bold "Cleaning stuff..." s -v -yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always) +yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always 2>/dev/null) s -v -yay -Sc --noconfirm +yay -Sc --noconfirm 2>/dev/null s -k notify-send "Update script has finished!"