From 01ecf777b9f8b006c450f033bc10d07fc1ac06da Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Tue, 5 Dec 2023 11:08:21 -0800 Subject: [PATCH] added updater helper --- .../Update_Sovran_SystemsOS.sh | 33 ++++----------- .../Update_Sovran_SystemsOS_Helper.sh | 41 +++++++++++++++++++ 2 files changed, 49 insertions(+), 25 deletions(-) create mode 100644 Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS_Helper.sh 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 4e81c9a..914331a 100755 --- a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh +++ b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS.sh @@ -1,31 +1,21 @@ #!/usr/bin/env bash - -curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" | - -zenity --text-info \ - --width=1000 \ - --height=700 \ - --title="Sovran_SystemsOS Updater" - - -if [[ $? -eq 1 ]]; then - - exit 1 - -else - if ! ssh root@localhost 'flatpak update -y' ; then + if ! flatpak update -y ; then - zenity --error + zenity --error \ + --title="Sovran_SystemsOS Updater" \ + --text="Could Not Update Flatpaks." exit 1 fi - if ! ssh root@localhost 'cd /etc/nixos ; nix flake update ; nixos-rebuild switch --impure' ; then + if ! cd /etc/nixos ; nix flake update ; nixos-rebuild switch --impure ; then - zenity --error + zenity --error \ + --title="Sovran_SystemsOS Updater" \ + --text="Could Not Update Sovran_SystemsOS" exit 1 @@ -33,11 +23,4 @@ else fi -zenity --info \ - --ellipsize \ - --no-wrap \ - --width=400 \ - --title="Sovran_SystemsOS Updater" \ - --text="Yay Complete! Please Reboot When You Are Ready." - exit 0 \ No newline at end of file diff --git a/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS_Helper.sh b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS_Helper.sh new file mode 100644 index 0000000..19c12f8 --- /dev/null +++ b/Sovran_SystemsOS_Updater/Updater Source Files/Update_Sovran_SystemsOS_Helper.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" | + +zenity --text-info \ + --width=1000 \ + --height=700 \ + --title="Sovran_SystemsOS Updater" + + +if [[ $? -eq 1 ]]; then + + exit 1 + +else + + +cd /home/free/Downloads + +wget "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Update_Sovran_SystemsOS_Helper.sh" + +if ! ssh root@localhost 'bash /home/free/Downloads/Update_Sovran_SystemsOS_Helper.sh | zenity --progress --no-cancel --pulsate --auto-close --width=500 --title="Sovran_SystemsOS_Reseter" --text="Please Wait. Passwords Are Being Reset. This May Take Some Time..."' ; then + + zenity --error \ + --title="Sovran_SystemsOS Updater" \ + --text="Could Not Log In" + + exit 1 + +fi + +rm -rf /home/free/Downloads/Master_Passwords_Reset_Root.sh + +zenity --info \ + --ellipsize \ + --no-wrap \ + --width=400 \ + --title="Sovran_SystemsOS Updater" \ + --text="Yay Complete! Please Reboot When You Are Ready." + +exit 0 \ No newline at end of file