mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 02:01:08 +00:00
Bruno Fontes
42344f98a5
Still not sure why I keep track of those changes, if I don't need them and do not care about proper handling them. Anyway, it is here if, some some reason I need it back.
33 lines
629 B
Bash
Executable File
33 lines
629 B
Bash
Executable File
BOLD='\e[91m'
|
|
NC='\e[39m'
|
|
|
|
function bold() {
|
|
echo -e "\n\n${BOLD}$1${NC}"
|
|
}
|
|
|
|
function s() {
|
|
sudo $*
|
|
}
|
|
|
|
s -v
|
|
bold "Pacman-mirrors --continent"
|
|
s "pacman-mirrors --continent" 2>/dev/null
|
|
# s "pacman-mirrors -c Brazil" 2>/dev/null
|
|
s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist" 2>/dev/null
|
|
|
|
# From now on, exit when any command fails
|
|
set -e
|
|
|
|
s -v
|
|
bold "Updating..."
|
|
yay -Syu --sudoloop --noconfirm --nobatchinstall --cleanafter
|
|
|
|
bold "Cleaning stuff..."
|
|
s -v
|
|
yay -Sc --noconfirm 2>/dev/null
|
|
s -v
|
|
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always 2>/dev/null)
|
|
|
|
s -k
|
|
notify-send "Update script has finished!"
|