Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # place this into your development directory (usually ~/Sites)
- dir=$(cd `dirname $0` && pwd)
- directories=(vendor node_modules temp log)
- for dirname in "${directories[@]}"
- do
- # -maxdepth 2 can be changed to other depth or removed completely
- for d in `find $dir -maxdepth 2 -type d -name $dirname`
- do
- `tmutil isexcluded $d | grep -q "Included"`
- if [ $? -eq 0 ]; then
- # -p can be removed so that given directory is not fixed, but rather mark directory itself as excluded no matter where you move it
- tmutil addexclusion -p $d
- echo "Dir $d is excluded now"
- fi;
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement