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.

Github-Pull: #32049
Rebased-From: a24419f8bed5e1145ce171dbbdad957750585471
This commit is contained in:
David Gumberg 2025-03-12 14:55:14 -07:00 committed by glozow
parent e9e6825b8c
commit 80c5d57bd1

View File

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