mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 04:57:53 +00:00
38 lines
1003 B
Bash
Executable File
38 lines
1003 B
Bash
Executable File
#!/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
|
|
|
|
rm -f *.1 *.2 *.8
|
|
|
|
if [ -e /usr/bin/ronn -o -e /usr/local/bin/ronn ]; then
|
|
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
|
|
fi
|
|
|
|
if [ ! -f node_modules/marked-man/bin/marked-man ]; then
|
|
echo 'Installing 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
|
|
$NODE node_modules/marked-man/bin/marked-man zerotier-idtool.1.md >zerotier-idtool.1
|
|
$NODE node_modules/marked-man/bin/marked-man zerotier-one.8.md >zerotier-one.8
|
|
fi
|
|
|
|
exit 0
|