added updater helper

This commit is contained in:
naturallaw77 2023-12-05 11:08:21 -08:00
parent b945f03562
commit 01ecf777b9
2 changed files with 49 additions and 25 deletions

View File

@ -1,43 +1,26 @@
#!/usr/bin/env bash
curl "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" |
if ! flatpak update -y ; then
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
zenity --error
exit 1
fi
if ! ssh root@localhost 'cd /etc/nixos ; nix flake update ; nixos-rebuild switch --impure' ; then
zenity --error
exit 1
fi
fi
zenity --info \
--ellipsize \
--no-wrap \
--width=400 \
zenity --error \
--title="Sovran_SystemsOS Updater" \
--text="Yay Complete! Please Reboot When You Are Ready."
--text="Could Not Update Flatpaks."
exit 1
fi
if ! cd /etc/nixos ; nix flake update ; nixos-rebuild switch --impure ; then
zenity --error \
--title="Sovran_SystemsOS Updater" \
--text="Could Not Update Sovran_SystemsOS"
exit 1
fi
fi
exit 0

View File

@ -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