2013-05-04 04:08:54 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2014-07-24 05:55:58 +08:00
|
|
|
|
2014-07-25 05:45:12 +08:00
|
|
|
if [[ "$(basename $0)" == "post-merge" ]]; then
|
|
|
|
PREVIOUS_HEAD=ORIG_HEAD
|
|
|
|
else
|
|
|
|
PREVIOUS_HEAD=$1
|
|
|
|
fi
|
|
|
|
|
2014-07-24 05:55:58 +08:00
|
|
|
# if style changed (and less/fabric available), rebuild sourcemaps
|
|
|
|
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)
|
|
|
|
&& ! -z $(which 2>/dev/null fab)
|
|
|
|
]]; then
|
|
|
|
echo "rebuilding sourcemaps"
|
|
|
|
cd IPython/html
|
2014-07-25 05:45:12 +08:00
|
|
|
fab css || echo "failed to compile css"
|
2014-07-24 05:55:58 +08:00
|
|
|
fi
|