Created
June 23, 2017 18:20
-
-
Save xaedes/a2c89cbccd68ff14ac0e61fca13c6b0b to your computer and use it in GitHub Desktop.
Remove existing stow target files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# iterate over all packages | |
for package in */ ; do | |
# go to stow package and remove all existing target files | |
cd $package > /dev/null | |
find . -type f -print0 | xargs -0 -i rm $(pwd)/../../{} | |
cd - > /dev/null | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment