diff --git a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS index 069f6f1..c2571d2 100755 --- a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS +++ b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS @@ -8,46 +8,39 @@ zenity --text-info \ --height=710 if [[ $? -eq 1 ]]; then - zenity --info \ - --title="Sovran_SystemsOS Updater" \ - --text="Update Canceled By User" - - exit 1 + + exit 1 fi password=$(zenity --password --title="Sovran_SystemsOS Updater") if [ $? -eq 1 ] ; then - zenity --info \ - --title="Sovran_SystemsOS Updater" \ - --text="Update Canceled By User" + exit 2 - exit 2 - - else - - - pushd /etc/nixos/ - - echo -e "$password" | sudo -S nix flake update - - popd + else - echo -e "$password" | sudo -S nixos-rebuild switch --impure | - zenity --progress \ - --no-cancel \ - --auto-close \ - --pulsate \ - --title="Sovran_SystemsOS Updater" + pushd /etc/nixos/ + + echo -e "$password" | sudo -S nix flake update + + popd - zenity --info \ - --ellipsize \ - --no-wrap \ - --title="Sovran_SystemsOS Updater" \ - --text="Complete! Please Reboot." + echo -e "$password" | sudo -S nixos-rebuild switch --impure | + zenity --progress \ + --no-cancel \ + --auto-close \ + --pulsate \ + --title="Sovran_SystemsOS Updater" + + + zenity --info \ + --ellipsize \ + --no-wrap \ + --title="Sovran_SystemsOS Updater" \ + --text="Complete! Please Reboot." fi