mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 02:01:08 +00:00
Including colors, using functions and fixing sudo pass on update
This commit is contained in:
parent
c19c418ef7
commit
547d35464a
@ -5,27 +5,24 @@ function bold() {
|
|||||||
echo -e "${BOLD}$1${NC}"
|
echo -e "${BOLD}$1${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function s() {
|
||||||
|
echo -e "$sudoPass\n" | sudo -S $1
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
echo -n Please type your sudo password:
|
echo -n Please type your sudo password:
|
||||||
read -s sudoPass
|
read -s sudoPass
|
||||||
echo
|
echo; echo
|
||||||
echo
|
|
||||||
bold "Pacman-mirrors -g"
|
bold "Pacman-mirrors -g"
|
||||||
|
s "pacman-mirrors -g"
|
||||||
echo
|
echo
|
||||||
echo "$sudoPass\n" | sudo -nS pacman-mirrors -g
|
bold "Updating with PACMAN..."
|
||||||
echo
|
s "pacman -Syu --color always"
|
||||||
echo
|
|
||||||
bold "Updating with Pacman..."
|
|
||||||
echo
|
|
||||||
echo "$sudoPass\n" | sudo -nS pacman -Syu --color always
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
bold "Updating with aurman..."
|
|
||||||
echo
|
echo
|
||||||
|
bold "Updating with AURMAN..."
|
||||||
aurman -Su --noedit --noconfirm --color always
|
aurman -Su --noedit --noconfirm --color always
|
||||||
echo
|
echo
|
||||||
echo
|
|
||||||
bold "Cleaning stuff..."
|
bold "Cleaning stuff..."
|
||||||
echo
|
echo -e "$sudoPass\n" | yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always)
|
||||||
echo "$sudoPass\n" | yes | (sudo -nS pacman -Rns $(pacman -Qtdq) --color always)
|
|
||||||
echo
|
echo
|
||||||
notify-send "Update script has finished!"
|
notify-send "Update script has finished!"
|
||||||
|
Loading…
Reference in New Issue
Block a user