1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 19:17:45 +00:00

Better exit management in rebuild.sh

This commit is contained in:
RGBCube 2023-05-11 22:39:14 +03:00
parent 043b767900
commit 479a9fce54

View file

@ -20,12 +20,7 @@ fi
sudo true
sed -i.old "s|@pwd@|$PWD|g" flake.nix
sudo nixos-rebuild switch --impure --flake .#$machine
if [[ $? != 0 ]]; then
exit 1
fi
sudo nixos-rebuild switch --impure --flake .#$machine || exit 1
mv -f flake.nix.old flake.nix
if [[ $1 != "-c" && $1 != "--clean-garbage" ]]; then