Skip to content

Commit a24419f

Browse files
committed
contrib: Fix gen-bitcoin-conf.sh.
In #31118, the format of bitcoind's `--help` output changed slightly in a way that breaks `gen-bitcoin-conf.sh`, modify the script to accomodate the new format, by starting after the line that says "Options:" and strip the `-help` option and its description from the output.
1 parent aa68ed2 commit a24419f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/devtools/gen-bitcoin-conf.sh

Lines changed: 2 additions & 1 deletion
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)