post-checkout
22 lines
| 567 B
| text/plain
|
TextLexer
/ git-hooks / post-checkout
Thomas Kluyver
|
r17605 | #!/bin/bash | ||
MinRK
|
r10551 | |||
git submodule init | ||||
git submodule update | ||||
MinRK
|
r17335 | |||
MinRK
|
r17361 | if [[ "$(basename $0)" == "post-merge" ]]; then | ||
PREVIOUS_HEAD=ORIG_HEAD | ||||
else | ||||
PREVIOUS_HEAD=$1 | ||||
fi | ||||
MinRK
|
r18351 | # if style changed (and less/invoke available), rebuild sourcemaps | ||
MinRK
|
r17335 | if [[ | ||
! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css)" | ||||
&& ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css)" | ||||
&& ! -z $(which 2>/dev/null lessc) | ||||
MinRK
|
r18351 | && ! -z $(which 2>/dev/null invoke) | ||
MinRK
|
r17335 | ]]; then | ||
echo "rebuilding sourcemaps" | ||||
cd IPython/html | ||||
Thomas Kluyver
|
r19410 | invoke css || echo "failed to compile css" | ||
MinRK
|
r17335 | fi | ||