Skip to content

Commit 5c2f044

Browse files
committed
Merge bitcoin#32049: contrib: Fix gen-bitcoin-conf.sh
a24419f contrib: Fix `gen-bitcoin-conf.sh`. (David Gumberg) Pull request description: In bitcoin#31118, the format of bitcoind's `--help` output changed slightly in a way that breaks `gen-bitcoin-conf.sh`, modify the script to accommodate the new format, by starting after the line that says "Options:" and stripping the `-help` options and descriptions from the script output. Before this PR, all options above `-help` were excluded from the example bitcoin.conf. ACKs for top commit: mabu44: Tested ACK a24419f glozow: ACK a24419f rkrux: tACK a24419f BrandonOdiwuor: crACK a24419f Tree-SHA512: 2ef697166d0b37b61ec1a20e357b91d611c932a0e453c4669f74ab69e6310ea1776dce09c1b77e82746072265763cb0c750e6df4c8b4a7d39068fc03f97b221b
2 parents 5d96c2e + a24419f commit 5c2f044

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/devtools/gen-bitcoin-conf.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ EOF
5050
# adding newlines is a bit funky to ensure portability for BSD
5151
# see here for more details: https://stackoverflow.com/a/24575385
5252
${BITCOIND} --help \
53-
| sed '1,/Print this help message and exit/d' \
53+
| sed '1,/Options:/d' \
54+
| sed -E '/^[[:space:]]{2}-help/,/^[[:space:]]*$/d' \
5455
| sed -E 's/^[[:space:]]{2}\-/#/' \
5556
| sed -E 's/^[[:space:]]{7}/# /' \
5657
| sed -E '/[=[:space:]]/!s/#.*$/&=1/' \

0 commit comments

Comments
 (0)