Add cleanup for transition to stow

This commit is contained in:
Andrew Tomaka 2021-05-13 21:42:40 -04:00
parent 4e5e48c64a
commit 8b44538414
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
2 changed files with 11 additions and 0 deletions

View file

@ -25,3 +25,6 @@ update: update-repo
update-repo: update-repo:
git pull --rebase git pull --rebase
clean:
bash remove-symlinks

8
remove-symlinks Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
find $HOME -maxdepth 1 -type l | while IFS= read -r symlink; do
if readlink "$symlink" | grep -q '^dotfiles/'; then
echo "removing $symlink"
rm "$symlink"
fi
done