File: post-checkout

package info (click to toggle)
cheetah 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,052 kB
  • sloc: python: 10,653; ansic: 584; xml: 323; sh: 181; makefile: 87
file content (13 lines) | stat: -rwxr-xr-x 296 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

# post-checkout hook: compile python files to byte code

prev_HEAD="$1"
new_HEAD="$2"
new_branch="$3"

if [ "$new_branch" = 1 ]; then
   # if branch was changed - remove old bytecode files and outdated docs
   find . -name '*.py[co]' -delete &&
   rm -rf docs/_build/html docs/html
fi