mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 04:14:58 +00:00
Improve security by removing password from variable
This commit is contained in:
parent
584b15b88b
commit
7424440645
@ -6,26 +6,26 @@ function bold() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function s() {
|
function s() {
|
||||||
echo -e "$sudoPass\n" | sudo -S $1
|
#echo -e "$sudoPass\n" | sudo --stdin $1 || exit 1
|
||||||
|
sudo $1
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
sudo -k
|
|
||||||
echo -n Please type your sudo password:
|
# bold "Pacman-mirrors -c"
|
||||||
read -s sudoPass
|
# s "pacman-mirrors -c Brazil"
|
||||||
|
# s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist"
|
||||||
|
|
||||||
|
s -v
|
||||||
echo
|
echo
|
||||||
s "echo '**********'"
|
bold "Updating..."
|
||||||
|
yay -Syu --sudoloop --noconfirm --nobatchinstall --cleanafter
|
||||||
bold "Pacman-mirrors -c"
|
|
||||||
s "pacman-mirrors -c Brazil"
|
|
||||||
s "reflector -l 30 -f 10 --save /etc/pacman.d/mirrorlist"
|
|
||||||
|
|
||||||
bold "Updating with AURMAN..."
|
|
||||||
s "echo"
|
|
||||||
yay -Syu --sudoloop --noconfirm --nobatchinstall
|
|
||||||
|
|
||||||
bold "Cleaning stuff..."
|
bold "Cleaning stuff..."
|
||||||
s "echo"
|
s -v
|
||||||
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always)
|
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always)
|
||||||
|
s -v
|
||||||
|
yay -Sc --noconfirm
|
||||||
|
|
||||||
|
s -k
|
||||||
notify-send "Update script has finished!"
|
notify-send "Update script has finished!"
|
||||||
|
Loading…
Reference in New Issue
Block a user