diff options
author | GeJ <geraud@gcu.info> | 2014-05-30 06:53:42 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-06-28 02:12:42 +0400 |
commit | 28d62174570e3e05d31ef0490137afaf9db5d289 (patch) | |
tree | c5598c8b607569b67b7941a37dc18a41d766eaea /scripts | |
parent | 59eb112eec7bfd0e39b6098142d76ad66d3aca14 (diff) |
Allow to build all the docs OOTB.
Since 1.4.10, the html docs are generated via the marked module. when
doing the usual "make" dance, the build process stops when attempting to
generate the first html doc complaining about a missing
node_modules/.bin/marked.
This patch is a quick'n'dirty copy-pasta of the treatment applied to
load the ronn module but applied to marked. When applied against the
1.4.13 tarball it allows -- at least in a works-for-me manner -- to
generate all the docs.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/doc-build.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/doc-build.sh b/scripts/doc-build.sh index 98dfa82f6..18f4e6ca8 100755 --- a/scripts/doc-build.sh +++ b/scripts/doc-build.sh @@ -32,6 +32,32 @@ if ! [ -x node_modules/.bin/ronn ]; then fi fi +if ! [ -x node_modules/.bin/marked ]; then + ps=0 + if [ -f .building_marked ]; then + pid=$(cat .building_marked) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked ] && [ $ps != 0 ]; then + while [ -f .building_marked ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked + echo $$ > .building_marked + sleep 1 + if [ $(cat .building_marked) == $$ ]; then + make node_modules/.bin/marked + rm .building_marked + else + while [ -f .building_marked ]; do + sleep 1 + done + fi + fi +fi + src=$1 dest=$2 name=$(basename ${src%.*}) |