Switch manual pages to "ronn," a program that converts MarkDown to roff man pages, and pre-build them. Also have the zerotier-cli(1) man page ready to go!

This commit is contained in:
Adam Ierymenko 2016-06-02 12:33:28 -07:00
parent f9148bf9cb
commit 096db53822
6 changed files with 203 additions and 163 deletions

25
doc/build.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
if [ ! -f zerotier-cli.1.md ]; then
echo 'This script must be run from the doc/ subfolder of the ZeroTier tree.'
fi
if [ ! -f node_modules/ronn/bin/ronn.js ]; then
echo 'Installing MarkDown to ROFF converter...'
npm install ronn
echo
fi
rm -f zerotier-cli.1 *.roff
node node_modules/ronn/bin/ronn.js --build --roff zerotier-cli.1.md
if [ -f zerotier-cli.1.roff ]; then
mv zerotier-cli.1.roff zerotier-cli.1
else
echo 'Conversion of zerotier-cli.1.md failed!'
exit 1
fi
exit 0