updated updater

This commit is contained in:
naturallaw77 2023-05-23 20:10:41 -07:00
parent cd363c0955
commit 6816045718

View File

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