Bugfixe
This commit is contained in:
parent
3dd14b6ffe
commit
164875b8a3
|
@ -14,36 +14,6 @@ sleep 1
|
||||||
source ~/dotfiles/scripts/library.sh
|
source ~/dotfiles/scripts/library.sh
|
||||||
clear
|
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
|
# Confirm Start
|
||||||
# ------------------------------------------------------
|
# ------------------------------------------------------
|
||||||
|
@ -52,7 +22,7 @@ while true; do
|
||||||
read -p "DO YOU WANT TO START THE UPDATE NOW? (Yy/Nn): " yn
|
read -p "DO YOU WANT TO START THE UPDATE NOW? (Yy/Nn): " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* )
|
[Yy]* )
|
||||||
echo "Update process started."
|
echo ""
|
||||||
break;;
|
break;;
|
||||||
[Nn]* )
|
[Nn]* )
|
||||||
exit;
|
exit;
|
||||||
|
@ -63,19 +33,23 @@ done
|
||||||
|
|
||||||
if [[ $(_isInstalledYay "Timeshift") == 1 ]];
|
if [[ $(_isInstalledYay "Timeshift") == 1 ]];
|
||||||
then
|
then
|
||||||
|
while true; do
|
||||||
echo ""
|
read -p "DO YOU WANT TO CREATE A SNAPSHOT? (Yy/Nn): " yn
|
||||||
echo "-----------------------------------------------------"
|
case $yn in
|
||||||
echo "Create a snapshot"
|
[Yy]* )
|
||||||
echo "-----------------------------------------------------"
|
echo ""
|
||||||
echo ""
|
read -p "Enter a comment for the snapshot: " c
|
||||||
read -p "Enter a comment for the snapshot: " c
|
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 ""
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
|
@ -85,4 +59,4 @@ echo ""
|
||||||
|
|
||||||
yay
|
yay
|
||||||
|
|
||||||
notify-send "Update complete" "$updates packages updated successfully"
|
notify-send "Update complete"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user