Ask the user whether they want to proceed
This commit is contained in:
18
arch_update
18
arch_update
@@ -22,6 +22,24 @@ echo -e '\nChecking for updates ...' >&2
|
|||||||
yay -Qua
|
yay -Qua
|
||||||
) | sort -u
|
) | sort -u
|
||||||
|
|
||||||
|
# Ask to proceed
|
||||||
|
while true; do
|
||||||
|
echo -e '\nDo you want to start the update? Y/n' >&2
|
||||||
|
read -r answer || exit 1
|
||||||
|
|
||||||
|
case $answer in
|
||||||
|
'' | [yY])
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[nN])
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e 'Answer with y or n.' >&2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# Backup system
|
# Backup system
|
||||||
if which btrfs >/dev/null 2>&1; then
|
if which btrfs >/dev/null 2>&1; then
|
||||||
yay -S --needed --noconfirm snapper
|
yay -S --needed --noconfirm snapper
|
||||||
|
|||||||
Reference in New Issue
Block a user