summaryrefslogtreecommitdiff
path: root/doc/build.sh
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-29 09:45:02 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-29 09:45:02 -0700
commit928c625e2cc3c5ee59dd5843a4f23a76511eb1c8 (patch)
treea893a43ac39fed247a2e2a42e5d60897235e72fd /doc/build.sh
parent0410fd4824fd898fab7815c6ef67b8e39bb6d2b9 (diff)
downloadinfinitytier-928c625e2cc3c5ee59dd5843a4f23a76511eb1c8.tar.gz
infinitytier-928c625e2cc3c5ee59dd5843a4f23a76511eb1c8.zip
docs
Diffstat (limited to 'doc/build.sh')
-rwxr-xr-xdoc/build.sh25
1 files changed, 15 insertions, 10 deletions
diff --git a/doc/build.sh b/doc/build.sh
index 5a2c77cb..9df72a33 100755
--- a/doc/build.sh
+++ b/doc/build.sh
@@ -9,24 +9,29 @@ fi
rm -f *.1 *.2 *.8
if [ -e /usr/bin/ronn -o -e /usr/local/bin/ronn ]; then
+ # Use 'ronn' which is available as a package on many distros including Debian
ronn -r zerotier-cli.1.md
ronn -r zerotier-idtool.1.md
ronn -r zerotier-one.8.md
else
- if [ ! -f /usr/bin/node -a ! -f /usr/bin/nodejs ]; then
- echo 'Unable to build man pages: no /usr/bin/ronn or /usr/bin/node / nodejs!'
- exit 0
+ # Use 'marked-man' from npm
+ NODE=/usr/bin/node
+ if [ ! -e $NODE ]; then
+ if [ -e /usr/bin/nodejs ]; then
+ NODE=/usr/bin/nodejs
+ elif [ -e /usr/local/bin/node ]; then
+ NODE=/usr/local/bin/node
+ elif [ -e /usr/local/bin/nodejs ]; then
+ NODE=/usr/local/bin/nodejs
+ else
+ echo 'Unable to find ronn or node/npm -- cannot build man pages!'
+ exit 1
+ fi
fi
if [ ! -f node_modules/marked-man/bin/marked-man ]; then
- echo 'Installing MarkDown to ROFF converter...'
+ echo 'Installing npm package "marked-man" -- MarkDown to ROFF converter...'
npm install marked-man
- echo
- fi
-
- NODE=/usr/bin/node
- if [ -e /usr/bin/nodejs ]; then
- NODE=/usr/bin/nodejs
fi
$NODE node_modules/marked-man/bin/marked-man zerotier-cli.1.md >zerotier-cli.1