Add a tool for removing stale *.pyc files

(imported from commit c0fcfb171932f523fff13f14f09ecf5b3a6b21de)
This commit is contained in:
Keegan McAllister 2012-10-12 13:26:40 -04:00
parent 35342481dc
commit deffda072f
1 changed files with 11 additions and 0 deletions

11
tools/clean-repo Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash -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' -print -delete | sed 's|^|[clean-repo] Deleting |'