diff --git a/scripts/clean b/scripts/clean index beae67c8..5d2edd1f 100755 --- a/scripts/clean +++ b/scripts/clean @@ -2,8 +2,12 @@ # remove artifacts which i've accidentally left lying around # e.g. `result -> /nix/store/...` symlinks -pushd .. -for result in $(fd --follow result); do +pushd ~/nixos + +# if this exists it'll interfere with the search +rm -f result + +for result in $(fd --follow result) $(fd -uuu result); do if [[ "$(readlink "$result")" != /nix/store/* ]]; then # not a build artifact continue