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:
parent
f9148bf9cb
commit
096db53822
6 changed files with 203 additions and 163 deletions
25
doc/build.sh
Executable file
25
doc/build.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue