2018-08-09 02:56:36 +00:00
|
|
|
BOLD='\e[91m'
|
|
|
|
NC='\e[39m'
|
|
|
|
|
|
|
|
function bold() {
|
2021-04-21 21:03:22 +00:00
|
|
|
echo -e "\n\n${BOLD}$1${NC}"
|
2018-08-09 02:56:36 +00:00
|
|
|
}
|
|
|
|
|
2018-08-09 03:34:40 +00:00
|
|
|
function s() {
|
2021-04-21 21:03:22 +00:00
|
|
|
sudo $*
|
2018-08-09 03:34:40 +00:00
|
|
|
}
|
|
|
|
|
2021-04-21 21:23:10 +00:00
|
|
|
# From now on, exit when any command fails
|
|
|
|
set -e
|
|
|
|
|
2021-02-20 02:23:12 +00:00
|
|
|
s -v
|
|
|
|
bold "Updating..."
|
2023-12-01 22:00:54 +00:00
|
|
|
s nice --adjustment=18 ionice -c 3 pacman -Syu
|
2023-06-23 13:10:17 +00:00
|
|
|
nice --adjustment=18 ionice -c 3 yay -Syu --sudoloop --answerclean none --answerdiff all --answerupgrade all --noremovemake --norebuild --noredownload --nobatchinstall --cleanafter
|
2018-08-09 17:45:26 +00:00
|
|
|
|
2018-08-09 02:56:36 +00:00
|
|
|
bold "Cleaning stuff..."
|
2021-02-20 02:23:12 +00:00
|
|
|
s -v
|
2021-04-21 21:03:22 +00:00
|
|
|
yay -Sc --noconfirm 2>/dev/null
|
2021-04-21 21:23:10 +00:00
|
|
|
s -v
|
2023-12-01 22:00:54 +00:00
|
|
|
yay -Yc 2>/dev/null
|
|
|
|
s -v
|
2021-04-21 21:23:10 +00:00
|
|
|
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always 2>/dev/null)
|
2018-08-09 17:45:26 +00:00
|
|
|
|
2021-02-20 02:23:12 +00:00
|
|
|
s -k
|
2023-06-23 13:10:17 +00:00
|
|
|
|
|
|
|
s /home/bruno/pacnew.sh
|
2018-06-22 04:48:41 +00:00
|
|
|
notify-send "Update script has finished!"
|