Skip to content

Instantly share code, notes, and snippets.

@xaedes
Created June 23, 2017 18:20
Show Gist options
  • Save xaedes/a2c89cbccd68ff14ac0e61fca13c6b0b to your computer and use it in GitHub Desktop.
Save xaedes/a2c89cbccd68ff14ac0e61fca13c6b0b to your computer and use it in GitHub Desktop.
Remove existing stow target files
#!/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