diff --git a/bashScripts/update_and_shutdown_fedora.sh b/bashScripts/update_and_shutdown_fedora.sh index cf8e3983..10650680 100644 --- a/bashScripts/update_and_shutdown_fedora.sh +++ b/bashScripts/update_and_shutdown_fedora.sh @@ -22,6 +22,25 @@ echo "" echo "sudo permissions available. Starting" echo "" + +if which "timeshift" &> /dev/null; then + echo "" + echo "Making snapshot with timeshift" + echo "" + sudo timeshift --create --comments "Pre Updates" +else + echo "" + echo "timeshift is not installed." + echo "continuining without making a snapshot" + echo "" +fi + + +echo "" +echo "Starting Updates" +echo "" + +sudo dnf clean all -y sudo dnf check -y sudo dnf check-update -y sudo dnf update -y @@ -29,11 +48,10 @@ sudo flatpak update -y sudo flatpak repair sudo flatpak uninstall --unused -y sudo dnf autoremove -y -sudo dnf clean all -y echo "" -echo "Press any key withing $SHUTDOWN_TIMEOUT seconds to cancel shutdown." +echo "Press any key within $SHUTDOWN_TIMEOUT seconds to cancel shutdown." echo "" if read -t $SHUTDOWN_TIMEOUT -n 1; then