2023-05-22 19:32:08 -07:00
|
|
|
#!/usr/bin/env bash
|
2023-05-22 14:32:15 -07:00
|
|
|
|
2023-05-22 22:23:31 -07:00
|
|
|
|
2023-05-23 12:23:50 -07:00
|
|
|
curl "https://git.sovransystems.com/Sovran_Systems/Packages/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Intro.md" |
|
2023-05-23 09:07:58 -07:00
|
|
|
zenity --text-info \
|
|
|
|
--title="Sovran_SystemsOS Updater" \
|
2023-05-23 12:22:45 -07:00
|
|
|
--width=1110 \
|
2023-05-23 12:34:29 -07:00
|
|
|
--height=710
|
2023-05-23 09:07:58 -07:00
|
|
|
|
|
|
|
if [[ $? -eq 1 ]]; then
|
2023-05-23 20:10:41 -07:00
|
|
|
|
|
|
|
exit 1
|
2023-05-23 09:07:58 -07:00
|
|
|
fi
|
2023-05-22 22:23:31 -07:00
|
|
|
|
2023-05-22 14:32:15 -07:00
|
|
|
password=$(zenity --password --title="Sovran_SystemsOS Updater")
|
|
|
|
|
|
|
|
if [ $? -eq 1 ] ; then
|
|
|
|
|
2023-05-23 20:10:41 -07:00
|
|
|
exit 2
|
2023-05-22 14:32:15 -07:00
|
|
|
|
2023-05-23 20:10:41 -07:00
|
|
|
else
|
|
|
|
|
2023-05-23 09:07:58 -07:00
|
|
|
|
2023-05-23 20:10:41 -07:00
|
|
|
pushd /etc/nixos/
|
2023-05-22 14:32:15 -07:00
|
|
|
|
2023-05-23 20:10:41 -07:00
|
|
|
echo -e "$password" | sudo -S nix flake update
|
2023-05-22 14:32:15 -07:00
|
|
|
|
2023-05-23 20:10:41 -07:00
|
|
|
popd
|
2023-05-22 14:32:15 -07:00
|
|
|
|
2023-05-23 09:07:58 -07:00
|
|
|
|
2023-05-23 20:10:41 -07:00
|
|
|
echo -e "$password" | sudo -S nixos-rebuild switch --impure |
|
|
|
|
zenity --progress \
|
|
|
|
--no-cancel \
|
|
|
|
--auto-close \
|
|
|
|
--pulsate \
|
|
|
|
--title="Sovran_SystemsOS Updater"
|
2023-05-22 14:32:15 -07:00
|
|
|
|
2023-05-23 09:07:58 -07:00
|
|
|
|
2023-05-23 20:10:41 -07:00
|
|
|
zenity --info \
|
|
|
|
--ellipsize \
|
|
|
|
--no-wrap \
|
|
|
|
--title="Sovran_SystemsOS Updater" \
|
|
|
|
--text="Complete! Please Reboot."
|
2023-05-22 14:32:15 -07:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|