Last active
August 29, 2015 13:56
-
-
Save skyler/8852680 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# save this file to $repo_dir/.git/hooks/post-checkout | |
# make it executable and symlink it to $repo_dir/.git/hooks/post-merge | |
# Delete .pyc files and empty directories from root of project | |
cd ./$(git rev-parse --show-cdup) | |
find . -type f -name "*.pyc" \ | |
! -path "./git/*" \ | |
! -path "./bower_components/*" \ | |
! -path "./node_modules/*" \ | |
! -path "./support/*" \ | |
! -path "./coefficient/*" \ | |
! -path "./alembic/*" \ | |
-print0 | xargs -0 rm > /dev/null 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment