mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 04:14:58 +00:00
Trying to fix bug with sudo password
This commit is contained in:
parent
ae915eef38
commit
c19c418ef7
@ -1,13 +1,31 @@
|
|||||||
|
BOLD='\e[91m'
|
||||||
|
NC='\e[39m'
|
||||||
|
|
||||||
|
function bold() {
|
||||||
|
echo -e "${BOLD}$1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
echo -n Please type your sudo password:
|
echo -n Please type your sudo password:
|
||||||
read -s sudoPass
|
read -s sudoPass
|
||||||
echo;
|
|
||||||
echo "$sudoPass" | sudo -S pacman-mirrors -g
|
|
||||||
echo
|
echo
|
||||||
echo Updating with Pacman...
|
|
||||||
echo
|
echo
|
||||||
echo "$sudoPass" | sudo -S pacman -Syu --color always
|
bold "Pacman-mirrors -g"
|
||||||
echo;
|
echo
|
||||||
|
echo "$sudoPass\n" | sudo -nS pacman-mirrors -g
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
bold "Updating with Pacman..."
|
||||||
|
echo
|
||||||
|
echo "$sudoPass\n" | sudo -nS pacman -Syu --color always
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
bold "Updating with aurman..."
|
||||||
|
echo
|
||||||
aurman -Su --noedit --noconfirm --color always
|
aurman -Su --noedit --noconfirm --color always
|
||||||
echo;
|
echo
|
||||||
echo "$sudoPass" | yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always)
|
echo
|
||||||
|
bold "Cleaning stuff..."
|
||||||
|
echo
|
||||||
|
echo "$sudoPass\n" | yes | (sudo -nS pacman -Rns $(pacman -Qtdq) --color always)
|
||||||
|
echo
|
||||||
notify-send "Update script has finished!"
|
notify-send "Update script has finished!"
|
||||||
|
Loading…
Reference in New Issue
Block a user