mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-27 03:20:27 +08:00
23 lines
567 B
Bash
Executable File
23 lines
567 B
Bash
Executable File
#!/bin/bash
|
|
|
|
git submodule init
|
|
git submodule update
|
|
|
|
if [[ "$(basename $0)" == "post-merge" ]]; then
|
|
PREVIOUS_HEAD=ORIG_HEAD
|
|
else
|
|
PREVIOUS_HEAD=$1
|
|
fi
|
|
|
|
# if style changed (and less/invoke 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 invoke)
|
|
]]; then
|
|
echo "rebuilding sourcemaps"
|
|
cd IPython/html
|
|
invoke css || echo "failed to compile css"
|
|
fi
|