mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
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: a24419f8be
This commit is contained in:
parent
e9e6825b8c
commit
80c5d57bd1
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,8 @@ EOF
|
||||||
# adding newlines is a bit funky to ensure portability for BSD
|
# adding newlines is a bit funky to ensure portability for BSD
|
||||||
# see here for more details: https://stackoverflow.com/a/24575385
|
# see here for more details: https://stackoverflow.com/a/24575385
|
||||||
${BITCOIND} --help \
|
${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:]]{2}\-/#/' \
|
||||||
| sed -E 's/^[[:space:]]{7}/# /' \
|
| sed -E 's/^[[:space:]]{7}/# /' \
|
||||||
| sed -E '/[=[:space:]]/!s/#.*$/&=1/' \
|
| sed -E '/[=[:space:]]/!s/#.*$/&=1/' \
|
||||||
|
|
Loading…
Add table
Reference in a new issue