From 6aca9f665b580aa9ad2beed8ab10f511e56ac180 Mon Sep 17 00:00:00 2001 From: Dustin Dettmer Date: Sun, 18 Sep 2022 21:53:22 -0400 Subject: [PATCH] devtools: Make fund_nodes compatible w/zsh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mac is updating to using zsh in general. The “for i in” reads strings with spaces as a single entry instead of multiple entries as sh did. Using “while read” … “<<< $var” makes it treat each space as a new entry. Changelog-None --- contrib/startup_regtest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/startup_regtest.sh b/contrib/startup_regtest.sh index 0b7b7eb6c..3f40fcb91 100755 --- a/contrib/startup_regtest.sh +++ b/contrib/startup_regtest.sh @@ -206,7 +206,7 @@ fund_nodes() { last_node="" - for i in $NODES; do + echo "$NODES" | while read -r i; do if [ -z "$last_node" ]; then last_node=$i @@ -253,6 +253,7 @@ fund_nodes() { done echo "done." + done }