tools: Add git utility scripts.

This commit is contained in:
derAnfaenger 2017-09-08 10:41:25 +02:00 committed by Tim Abbott
parent d05e932968
commit ea105ffec5
7 changed files with 242 additions and 0 deletions

13
tools/clean-repo Normal file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e
# Remove .pyc files to prevent loading stale code.
#
# You can run it automatically on checkout:
#
# echo ./tools/clean-repo > .git/hooks/post-checkout
# chmod +x .git/hooks/post-checkout
cd "$(dirname "$0")/.."
find . -name "*.pyc" -exec rm -f {} \;
find . -name "__pycache__" -prune -exec rm -rf {} \;