Created
March 10, 2014 16:50
-
-
Save ronnix/9468892 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$ cat .git/hooks/post-checkout | |
#!/bin/bash | |
# Remove stray .pyc files | |
find . -name '*.pyc' -delete | |
# Update requirements if needed | |
for filename in requirements.txt dev-requirements.txt test-requirements.txt ; do | |
CHANGED=`git diff HEAD@{1} --stat -- $GIT_DIR/../$filename | wc -l` | |
if [ $CHANGED -gt 0 ]; | |
then | |
echo "$filename has changed!" | |
pip install -r $filename | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment