Bugfixe
This commit is contained in:
parent
3dd14b6ffe
commit
164875b8a3
|
@ -14,36 +14,6 @@ sleep 1
|
|||
source ~/dotfiles/scripts/library.sh
|
||||
clear
|
||||
|
||||
echo "-----------------------------------------------------"
|
||||
echo "Check for updates"
|
||||
echo "-----------------------------------------------------"
|
||||
echo ""
|
||||
|
||||
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$(("$updates_arch" + "$updates_aur"))
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
|
||||
echo "-> Pacman:"
|
||||
checkupdates
|
||||
echo ""
|
||||
echo "-> AUR"
|
||||
trizen -Su --aur
|
||||
echo ""
|
||||
echo "-> $updates updates available."
|
||||
echo ""
|
||||
else
|
||||
echo "-> NO updates available"
|
||||
exit
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Confirm Start
|
||||
# ------------------------------------------------------
|
||||
|
@ -52,7 +22,7 @@ while true; do
|
|||
read -p "DO YOU WANT TO START THE UPDATE NOW? (Yy/Nn): " yn
|
||||
case $yn in
|
||||
[Yy]* )
|
||||
echo "Update process started."
|
||||
echo ""
|
||||
break;;
|
||||
[Nn]* )
|
||||
exit;
|
||||
|
@ -63,19 +33,23 @@ done
|
|||
|
||||
if [[ $(_isInstalledYay "Timeshift") == 1 ]];
|
||||
then
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------------"
|
||||
echo "Create a snapshot"
|
||||
echo "-----------------------------------------------------"
|
||||
echo ""
|
||||
read -p "Enter a comment for the snapshot: " c
|
||||
sudo timeshift --create --comments "$c"
|
||||
sudo timeshift --list
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
echo "DONE. Snapshot $c created!"
|
||||
echo ""
|
||||
|
||||
while true; do
|
||||
read -p "DO YOU WANT TO CREATE A SNAPSHOT? (Yy/Nn): " yn
|
||||
case $yn in
|
||||
[Yy]* )
|
||||
echo ""
|
||||
read -p "Enter a comment for the snapshot: " c
|
||||
sudo timeshift --create --comments "$c"
|
||||
sudo timeshift --list
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
echo "DONE. Snapshot $c created!"
|
||||
echo ""
|
||||
break;;
|
||||
[Nn]* )
|
||||
break;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
echo "-----------------------------------------------------"
|
||||
|
@ -85,4 +59,4 @@ echo ""
|
|||
|
||||
yay
|
||||
|
||||
notify-send "Update complete" "$updates packages updated successfully"
|
||||
notify-send "Update complete"
|
||||
|
|
Loading…
Reference in New Issue
Block a user