| 1 | #!/bin/sh |
| 2 | |
| 3 | # post-checkout hook: compile python files to byte code |
| 4 | |
| 5 | prev_HEAD="$1" |
| 6 | new_HEAD="$2" |
| 7 | new_branch="$3" |
| 8 | |
| 9 | if [ "$new_branch" = 1 ]; then |
| 10 | # if branch was changed - remove old bytecode files and outdated docs |
| 11 | find . -name '*.py[co]' -delete && |
| 12 | rm -rf docs/_build/html docs/html |
| 13 | fi |