Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # This simple bash script is aimed at excluding some development specific directories.
- #
- # In this configuration it will instruct Time Machine to exclude directories named:
- # - env
- # - node_modules
- # - vendor
- # - venv
- #
- # Feel free to update this array to your own needs.
- EXCLUDED_DIRECTORIES=( "env" "node_modules" "vendor" "venv" )
- WORK_DIR=$(dirname "${BASH_SOURCE[0]}")
- WORK_DIR=$(realpath "${WORK_DIR}")
- for EXCLUDED_DIRECTORY in "${EXCLUDED_DIRECTORIES[@]}"; do
- find ${WORK_DIR} -maxdepth 2 -type d -name ${EXCLUDED_DIRECTORY} -prune -exec tmutil addexclusion {} \;
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement