diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-18 12:00:45 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-18 12:00:45 -0700 |
commit | e9857bfbfb9edeabee7329aa407555e51f7710c5 (patch) | |
tree | f49f6f55703881b5bea2f6abd46772c55cc6b997 /.mrconfig.in | |
parent | d34f62c976b53df6ce9e26f66944cfc5f69aaf40 (diff) | |
download | dotfiles-e9857bfbfb9edeabee7329aa407555e51f7710c5.tar.gz |
clean up old symlinks too
Diffstat (limited to '.mrconfig.in')
-rw-r--r-- | .mrconfig.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.mrconfig.in b/.mrconfig.in index b0a77342..9e098350 100644 --- a/.mrconfig.in +++ b/.mrconfig.in @@ -132,6 +132,12 @@ lib = chmod 700 local/auth # [ -L "src/build-area" ] || ln -s -T /tmp/debuild src/build-area [ -e "Downloads" ] || ln -s tmp Downloads + # clean up after additions to .stow-local-ignore + find bin lib/aid -type l 2>/dev/null | while read -r link; do + if readlink "$link" | grep --quiet "^[../]*/.STOW/"; then + rm "$link" + fi + done # cleanup some old dirs if they're empty find \ bin \ |