add script to generate manpages with help2man

This commit is contained in:
nomnombtc 2016-08-27 00:59:07 +02:00 committed by Jack Grigg
parent 5f619492e8
commit 95d93342c8
No known key found for this signature in database
GPG Key ID: 6A6914DAFBEA00DA
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#!/bin/sh
# the autodetected version git tag at the end
# can screw up manpage output a little bit
BTCVER=$(bitcoin-cli --version | cut -d"-" -f1 | cut -d"v" -f3)
# Create a footer file with copyright content.
# This gets autodetected fine for bitcoind if
# --version-string is not set, but has different
# outcomes for bitcoin-qt and bitcoin-cli.
echo "[COPYRIGHT]" > footer.h2m
bitcoind --version | sed -n '1!p' >> footer.h2m
for cmd in bitcoind bitcoin-qt bitcoin-cli; do
help2man -N --version-string=${BTCVER} --include=footer.h2m -o ../../doc/man/${cmd}.1 ${cmd}
done
rm -f footer.h2m