scripts/clean: fix to cleanup more dangling result
symlinks
This commit is contained in:
parent
67434caf45
commit
bef0099eec
|
@ -2,8 +2,12 @@
|
||||||
# remove artifacts which i've accidentally left lying around
|
# remove artifacts which i've accidentally left lying around
|
||||||
# e.g. `result -> /nix/store/...` symlinks
|
# e.g. `result -> /nix/store/...` symlinks
|
||||||
|
|
||||||
pushd ..
|
pushd ~/nixos
|
||||||
for result in $(fd --follow result); do
|
|
||||||
|
# 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
|
if [[ "$(readlink "$result")" != /nix/store/* ]]; then
|
||||||
# not a build artifact
|
# not a build artifact
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user