Skip to content

Instantly share code, notes, and snippets.

@saswata-dutta
Created February 27, 2020 20:26
Show Gist options
  • Save saswata-dutta/94c20ce1cc3889306acde98658e37ccf to your computer and use it in GitHub Desktop.
Save saswata-dutta/94c20ce1cc3889306acde98658e37ccf to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Cleans all target directories.
#
# Just `sbt clean` won't remove all downloaded and/or compiled classes and .jars, and this may
# result in compilation exceptions when moving between branches with different dependencies.
#
set -o nounset -o errexit
find . -name 'target' | grep '/target$' | awk '{print "rm -Rf " $1 "/*"}' | sh
sbt clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment