linuxShortcuts/Pacman/updateRepositories.sh

31 lines
485 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() {
sudo $1
echo
}
2021-03-24 02:14:15 +00:00
s -v
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!"