Created
July 17, 2014 03:15
-
-
Save shovon/41d23cbdfefc0362c78e to your computer and use it in GitHub Desktop.
A utility to delete all repository folders from dependencies. Useful when you want to check dependencies in with the source code. All credit goes to http://blog.robertmeta.com/post/76233441527/stop-overcomplicated-go-lang-build-deps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
export GOPATH=$DIR | |
echo "Clean up source history downloaded" | |
find . -type d | grep \.hg$ | xargs rm -rf | |
find . -type d | grep \.bzr$ | xargs rm -rf | |
find . -type d | grep -v ^\./\.git$ | grep \.git$ | xargs rm -rf | |
# might need to add svn if we ever use SVN repos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment