This commit is contained in:
Stephan Raabe 2024-03-02 08:38:58 +01:00
parent 0c4626c6e1
commit 16eb1b7915

View File

@ -31,15 +31,14 @@ _isInstalledYay() {
if gum confirm "DO YOU WANT TO START THE UPDATE NOW?" ;then if gum confirm "DO YOU WANT TO START THE UPDATE NOW?" ;then
echo echo
echo "Update started." echo ":: Update started."
elif [ $? -eq 130 ]; then elif [ $? -eq 130 ]; then
exit 130 exit 130
else else
echo echo
echo "Update canceled." echo ":: Update canceled."
exit; exit;
fi fi
echo ""
if [[ $(_isInstalledYay "timeshift") == "0" ]] ;then if [[ $(_isInstalledYay "timeshift") == "0" ]] ;then
if gum confirm "DO YOU WANT TO CREATE A SNAPSHOT?" ;then if gum confirm "DO YOU WANT TO CREATE A SNAPSHOT?" ;then
@ -48,13 +47,13 @@ if [[ $(_isInstalledYay "timeshift") == "0" ]] ;then
sudo timeshift --create --comments "$c" sudo timeshift --create --comments "$c"
sudo timeshift --list sudo timeshift --list
sudo grub-mkconfig -o /boot/grub/grub.cfg sudo grub-mkconfig -o /boot/grub/grub.cfg
echo "DONE. Snapshot $c created!" echo ":: DONE. Snapshot $c created!"
echo echo
elif [ $? -eq 130 ]; then elif [ $? -eq 130 ]; then
echo "Snapshot canceled." echo ":: Snapshot canceled."
exit 130 exit 130
else else
echo "Snapshot canceled." echo ":: Snapshot canceled."
fi fi
echo echo
fi fi
@ -62,3 +61,6 @@ fi
yay yay
notify-send "Update complete" notify-send "Update complete"
echo
echo ":: Update complete"
sleep 2