forked from colin/nix-files
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
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue
Block a user