linuxShortcuts/Pacman/updateRepositories.sh

32 lines
541 B
Bash
Raw Normal View History

2018-08-09 02:56:36 +00:00
BOLD='\e[91m'
NC='\e[39m'
function bold() {
echo -e "${BOLD}$1${NC}"
}
function s() {
#echo -e "$sudoPass\n" | sudo --stdin $1 || exit 1
sudo $1
echo
}
2018-08-09 17:45:26 +00:00
# bold "Pacman-mirrors -c"
# s "pacman-mirrors -c Brazil"
# s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist"
2018-08-09 17:45:26 +00:00
s -v
echo
bold "Updating..."
yay -Syu --sudoloop --noconfirm --nobatchinstall --cleanafter
2018-08-09 17:45:26 +00:00
2018-08-09 02:56:36 +00:00
bold "Cleaning stuff..."
s -v
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always)
s -v
yay -Sc --noconfirm
2018-08-09 17:45:26 +00:00
s -k
notify-send "Update script has finished!"