linuxShortcuts/Pacman/updateRepositories.sh
Bruno Fontes 11aa184e80 Including reflector as well as pacman-mirros
There is no pacman-mirrors to arch linux, so
I am including the reflector command to be used
on my arch linux.
2018-11-16 22:27:16 -02:00

36 lines
651 B
Bash
Executable File

BOLD='\e[91m'
NC='\e[39m'
function bold() {
echo -e "${BOLD}$1${NC}"
}
function s() {
echo -e "$sudoPass\n" | sudo -S $1
echo
}
sudo -k
echo -n Please type your sudo password:
read -s sudoPass
echo
s "echo '**********'"
bold "Pacman-mirrors -c"
s "pacman-mirrors -c Brazil"
s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist"
#bold "Updating with PACMAN..."
s "echo"
yes | sudo pacman -Syyu --color always
bold "Updating with AURMAN..."
s "echo"
aurman -Su --noedit --noconfirm --color always
bold "Cleaning stuff..."
s "echo"
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always)
notify-send "Update script has finished!"