linuxShortcuts/Pacman/updateRepositories.sh
Bruno Fontes 895f356687
Replacing the s"command"
Avoinding issues using the "s" command
only with echo.

Pacman-mirrors - As I have used only
mirrors from Brazil, it makes more sense
to restrict it just here.
2018-10-25 20:25:36 -03:00

35 lines
593 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"
#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!"