From fb497df56c6eddd5774f76d66be7af2d0282f293 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Wed, 13 Mar 2024 20:40:08 -0700 Subject: [PATCH] update updater script --- .../Update_Sovran_SystemsOS.sh | 69 +++++-------------- 1 file changed, 16 insertions(+), 53 deletions(-) diff --git a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh index 1379d44..746bc7c 100755 --- a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh +++ b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh @@ -14,7 +14,7 @@ fi } -CASHU () { +SPICE () { if ! ssh root@localhost 'cd /etc/nixos && nix flake update && nixos-rebuild switch --impure &> /home/free/Documents/Updater_App_Logs/'$time_stamp'_Updater_Log.txt' ; then @@ -27,67 +27,32 @@ if ! ssh root@localhost 'cd /etc/nixos && nix flake update && nixos-rebuild swit else - exit 1 -fi + if ! ssh root@localhost 'cd /etc/nixos && nix flake update && nixos-rebuild switch --impure &> /home/free/Documents/Updater_App_Logs/'$time_stamp'_Updater_Log.txt' ; then + zenity --error \ + --width=400 \ + --title="Sovran_SystemsOS Updater" \ + --text="Could not complete the Sovran_SystemsOS update." -} + exit 1 + else + zenity --info \ + --ellipsize \ + --no-wrap \ + --width=500 \ + --title="Sovran_SystemsOS Updater" \ + --text="Yay complete! Please reboot when you are ready." -SPICE () { - -time_stamp=$(date +%Y-%m-%d-%T) - -mkdir -p /home/free/Documents/Updater_App_Logs - -if ! ssh root@localhost 'cd /etc/nixos && nix flake update' ; then - - zenity --error \ - --width=400 \ - --title="Sovran_SystemsOS Updater" \ - --text="Could not complete the Sovran_SystemsOS flake update." - - exit 1 - -fi - - -if ! ssh root@localhost 'nixos-rebuild dry-activate --impure' ; then - - zenity --error \ - --width=400 \ - --title="Sovran_SystemsOS Updater" \ - --text="Could not complete the test Sovran_SystemsOS update." - - exit 1 - -fi - - -if ! ssh root@localhost 'nixos-rebuild switch --impure &> /home/free/Documents/Updater_App_Logs/'$time_stamp'_Updater_Log.txt' ; then - - zenity --error \ - --width=400 \ - --title="Sovran_SystemsOS Updater" \ - --text="Could not complete the Sovran_SystemsOS update." - - exit 1 - -else - - zenity --info \ - --ellipsize \ - --no-wrap \ - --width=500 \ - --title="Sovran_SystemsOS Updater" \ - --text="Yay complete! Please reboot when you are ready." + fi fi } + ######### curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" | @@ -105,8 +70,6 @@ else FLATPAK | zenity --progress --no-cancel --auto-close --width=460 --pulsate --text="Updating Flatpaks now..." --title="Sovran_SystemsOS Updater" - CASHU - SPICE | zenity --progress --no-cancel --auto-close --width=850 --pulsate --text="Updating now. In rare cases, it could take up to 3 hours. Go have some herbal tea and relax while the update is in progress." --title="Sovran_SystemsOS Updater" find /home/free/Documents/Updater_App_Logs -name "*.txt" -type f -mtime +5 -delete