mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
Merge #8608: Install manpages via make install, also add some autogenerated manpages
d19583fimproved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control (nomnombtc)09546caregenerated all manpages with commit tag stripped, also add bitcoin-tx (nomnombtc)ae6e754change help string --enable-man to --disable-man (nomnombtc)a32c102add conditional for --enable-man, default is yes (nomnombtc)dc84b6fadd doc/man to subdir if configure flag --enable-man is set (nomnombtc)00dba72add doc/man/Makefile.am to include manpages (nomnombtc)eb5643badd autogenerated manpages by help2man (nomnombtc)6edf2fdadd gen-manpages.sh description to README.md (nomnombtc)d2cd9c0add script to generate manpages with help2man (nomnombtc)
This commit is contained in:
@@ -40,6 +40,12 @@ would be changed to:
|
||||
|
||||
```// Copyright (c) 2009-2015 The Bitcoin Core developers```
|
||||
|
||||
gen-manpages.sh
|
||||
===============
|
||||
|
||||
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
|
||||
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
|
||||
|
||||
git-subtree-check.sh
|
||||
====================
|
||||
|
||||
|
||||
29
contrib/devtools/gen-manpages.sh
Executable file
29
contrib/devtools/gen-manpages.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
|
||||
SRCDIR=${SRCDIR:-$TOPDIR/src}
|
||||
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
||||
|
||||
BITCOIND=${BITCOIND:-$SRCDIR/bitcoind}
|
||||
BITCOINCLI=${BITCOINCLI:-$SRCDIR/bitcoin-cli}
|
||||
BITCOINTX=${BITCOINTX:-$SRCDIR/bitcoin-tx}
|
||||
BITCOINQT=${BITCOINQT:-$SRCDIR/qt/bitcoin-qt}
|
||||
|
||||
[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1
|
||||
|
||||
# The autodetected version git tag can screw up manpage output a little bit
|
||||
BTCVER=($($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))
|
||||
|
||||
# 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 $BITCOINCLI $BITCOINTX $BITCOINQT; do
|
||||
cmdname="${cmd##*/}"
|
||||
help2man -N --version-string=${BTCVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
|
||||
sed -i "s/\\\-${BTCVER[1]}//g" ${MANDIR}/${cmdname}.1
|
||||
done
|
||||
|
||||
rm -f footer.h2m
|
||||
Reference in New Issue
Block a user