Fix clean target to remove all symlinks, not just dangling ones
-xtype l only catches broken symlinks; a stale symlink pointing to a file that still exists (e.g. leftover from stow laptop on a work PC) would survive clean and then block the next stow run. Also add .zshrc/.zshenv to the clean sweep. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
Makefile
4
Makefile
@@ -10,5 +10,7 @@ clean:
|
||||
stow -D shared laptop work 2>/dev/null; \
|
||||
find $(HOME)/.config/nvim $(HOME)/.config/emacs $(HOME)/.config/tmux \
|
||||
$(HOME)/.config/ghostty $(HOME)/.config/ranger \
|
||||
-maxdepth 4 -xtype l -delete 2>/dev/null; \
|
||||
-maxdepth 4 -type l -delete 2>/dev/null; \
|
||||
find $(HOME) -maxdepth 1 -type l \( -name '.zshrc' -o -name '.zshenv' \) \
|
||||
-delete 2>/dev/null; \
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user