1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Better handling of PWD replacement

This commit is contained in:
RGBCube 2023-05-11 22:26:24 +03:00
parent abe975f870
commit b6b15214d6

View file

@ -19,6 +19,7 @@ fi
sudo true
flake_nix_old=$(cat flake.nix)
sed -ie "s|@pwd@|$PWD|g" flake.nix
(sleep 1; rm flake.nixe) &
@ -27,8 +28,7 @@ if [[ $? != 0 ]]; then
exit 1
fi
sed -ie "s|$PWD|@pwd@|g" flake.nix
rm flake.nixe
echo $flake_nix_old > flake.nix
if [[ $1 != "-c" && $1 != "--clean-garbage" ]]; then
read -p "Clean garbage? [Y/N]: " clean_garbage