Skip to content

Commit

Permalink
Merge bitcoin#20913: doc: Add manual page generation for bitcoin-util
Browse files Browse the repository at this point in the history
bc99ae7 scripted-diff: Fix typo in stub manual pages (Wladimir J. van der Laan)
b5e93f8 doc: Add manual page generation for bitcoin-util (Wladimir J. van der Laan)

Pull request description:

  - Add `-version` option to `bitcoin-util`
  - Add `bitcoin-util` call to `gen-manpages.sh`
  - Add stub manual page `bitcoin-util.1`
  - Add install of `bitcoin-util.1` to build system

ACKs for top commit:
  fanquake:
    ACK bc99ae7

Tree-SHA512: 948df66c62bbca1cf6da26845dfa63f8f5d036a3d5744add468dd1ce7f442c123d7b0db7011c2e8e3ee6539fd391c7ee2c21b706ec81b21b02821c9501cd077d
  • Loading branch information
laanwj authored and vijaydasmp committed Nov 10, 2023
1 parent 704172f commit c4dcab8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/devtools/gen-manpages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ BITCOIND=${BITCOIND:-$BINDIR/dashd}
BITCOINCLI=${BITCOINCLI:-$BINDIR/dash-cli}
BITCOINTX=${BITCOINTX:-$BINDIR/dash-tx}
WALLET_TOOL=${WALLET_TOOL:-$BINDIR/dash-wallet}
BITCOINUTIL=${BITCOINQT:-$BINDIR/dash-util}
BITCOINQT=${BITCOINQT:-$BINDIR/qt/dash-qt}

[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1

# Don't allow man pages to be generated for binaries built from a dirty tree
DIRTY=""
for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $WALLET_TOOL $BITCOINQT; do
for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $WALLET_TOOL $BITCOINUTIL $BITCOINQT; do
VERSION_OUTPUT=$($cmd --version)
if [[ $VERSION_OUTPUT == *"dirty"* ]]; then
DIRTY="${DIRTY}${cmd}\n"
Expand All @@ -43,7 +44,7 @@ read -r -a BTCVER <<< "$($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ prin
echo "[COPYRIGHT]" > footer.h2m
$BITCOIND --version | sed -n '1!p' >> footer.h2m

for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $WALLET_TOOL $BITCOINQT; do
for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $WALLET_TOOL $BITCOINUTIL $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
Expand Down
4 changes: 4 additions & 0 deletions doc/man/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if BUILD_BITCOIN_TX
dist_man1_MANS+=dash-tx.1
endif

if BUILD_BITCOIN_UTIL
dist_man1_MANS+=bitcoin-util.1
endif

if ENABLE_WALLET
if BUILD_BITCOIN_WALLET
dist_man1_MANS+=dash-wallet.1
Expand Down
5 changes: 5 additions & 0 deletions doc/man/bitcoin-util.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.TH BITCOIN-UTIL "1"
.SH NAME
bitcoin-util \- manual page for bitcoin-util

This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release.

0 comments on commit c4dcab8

Please sign in to comment.