Skip to content

Instantly share code, notes, and snippets.

@debasishg
Forked from viktorklang/exclude_targetdirs.sh
Created January 21, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debasishg/6702c844307e57b16cbac542fa061109 to your computer and use it in GitHub Desktop.
Save debasishg/6702c844307e57b16cbac542fa061109 to your computer and use it in GitHub Desktop.
Adds all your sbt target dirs as path excludes for Time Machine
#WARNING: Use at your own risk. No warranties expressed or implied. YMMV. Drive responsibly. Eat healthy.
#First, `cd` into the parent dir for all of your `sbt`/`maven` projects (I assume you have one of those)
find "$(cd ..; pwd)" -type d -name "target" -exec sudo tmutil addexclusion -p {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment