2014-08-11 08:26:54 +08:00
|
|
|
#!/bin/bash
|
2013-05-04 04:08:54 +08:00
|
|
|
|
|
|
|
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-10-16 07:37:27 +08:00
|
|
|
# if style changed (and less/invoke available), rebuild sourcemaps
|
2014-07-24 05:55:58 +08:00
|
|
|
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)
|
2014-10-16 07:37:27 +08:00
|
|
|
&& ! -z $(which 2>/dev/null invoke)
|
2014-07-24 05:55:58 +08:00
|
|
|
]]; then
|
|
|
|
echo "rebuilding sourcemaps"
|
|
|
|
cd IPython/html
|
2014-12-11 02:35:00 +08:00
|
|
|
invoke css || echo "failed to compile css"
|
2014-07-24 05:55:58 +08:00
|
|
|
fi
|