From 80c5d57bd118b1812c21604224dd316214af879c Mon Sep 17 00:00:00 2001 From: David Gumberg Date: Wed, 12 Mar 2025 14:55:14 -0700 Subject: [PATCH] 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 --- contrib/devtools/gen-bitcoin-conf.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/devtools/gen-bitcoin-conf.sh b/contrib/devtools/gen-bitcoin-conf.sh index 234318e1a14..d31f5462956 100755 --- a/contrib/devtools/gen-bitcoin-conf.sh +++ b/contrib/devtools/gen-bitcoin-conf.sh @@ -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/' \