python-zulip-api/tools/clean-repo

14 lines
341 B
Plaintext
Raw Permalink Normal View History

2017-09-08 04:41:25 -04:00
#!/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 {} \;