diff options
author | isaacs <i@izs.me> | 2011-10-04 05:47:53 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-10-04 05:47:53 +0400 |
commit | b337aced94f3e7d8c0de148e3bbb77f73020c23d (patch) | |
tree | 5eefec215ad516d70e3b375dc5ecbd4d4acaa578 /scripts | |
parent | bd0c73dbbe9dbe11ff2f75fb7ef11c7431a59ab9 (diff) |
Update 'make doc' to only ronn build if necessary
Also, updated to play nicely with 'make -j8 doc'
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/doc-build.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/doc-build.sh b/scripts/doc-build.sh index 915a3793e..6c32ea183 100755 --- a/scripts/doc-build.sh +++ b/scripts/doc-build.sh @@ -6,7 +6,25 @@ fi set -o errexit set -o pipefail -[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn +if ! [ -x node_modules/.bin/ronn ]; then + if [ -f .building_ronn ]; then + while [ -f .building_ronn ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install ronn + echo $$ > .building_ronn + sleep 1 + if [ $(cat .building_ronn) == $$ ]; then + make node_modules/ronn + rm .building_ronn + else + while [ -f .building_ronn ]; do + sleep 1 + done + fi + fi +fi src=$1 dest=$2 |