"Fossies" - the Fresh Open Source Software Archive

Member "cheetah3-3.2.6.post2/devscripts/git-hooks/post-checkout" (20 Apr 2021, 397 Bytes) of package /linux/www/cheetah3-3.2.6.post2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "post-checkout": 3-3.2.1_vs_3-3.2.2.

    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 &&
   14 
   15 python    -m compileall -q -x '\.tox/.+' . &&
   16 python -O -m compileall -q -x '\.tox/.+' .
   17 
   18 exit 0