Added Sovran_SystemsOS_Updater_Bash_Script
This commit is contained in:
parent
b33955d9aa
commit
0f59260e27
36
Sovran_SystemsOS_Updater/Update Sovran_SystemsOS
Executable file
36
Sovran_SystemsOS_Updater/Update Sovran_SystemsOS
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
password=$(zenity --password --title="Sovran_SystemsOS Updater")
|
||||
|
||||
if [ $? -eq 1 ] ; then
|
||||
|
||||
zenity --error \
|
||||
--text="Update canceled."
|
||||
|
||||
exit 1
|
||||
|
||||
else
|
||||
|
||||
zenity --info \
|
||||
--ellipsize \
|
||||
--no-wrap \
|
||||
--title="Sovran_SystemsOS Updater" \
|
||||
--text="$( echo -e "$password" | sudo -S rsync -av /home/free/Documents/Sovran\ Systems/My\ NixOS\ Laptop/configuration.nix /etc/nixos/configuration.nix)"
|
||||
|
||||
pushd /etc/nixos/
|
||||
|
||||
echo -e $password | sudo -S nix flake update
|
||||
|
||||
popd
|
||||
|
||||
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
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user