From c369253b5cf4de4fd38fa604a32b53b14c24676a Mon Sep 17 00:00:00 2001 From: wanwiset25 Date: Fri, 29 Nov 2024 11:29:35 +0400 Subject: [PATCH] update bootnode check script --- cicd/devnet/start.sh | 7 +++++++ cicd/mainnet/start.sh | 7 +++++++ cicd/testnet/start.sh | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/cicd/devnet/start.sh b/cicd/devnet/start.sh index dcc6e86ee78b..5a002b96da4b 100755 --- a/cicd/devnet/start.sh +++ b/cicd/devnet/start.sh @@ -24,6 +24,13 @@ do bootnodes="${bootnodes},$line" fi done < "$input" +#check last line since it's not included in "read" command https://stackoverflow.com/questions/12916352/shell-script-read-missing-last-line +if [ -z "${bootnodes}" ] +then + bootnodes=$line +else + bootnodes="${bootnodes},$line" +fi log_level=3 if test -z "$LOG_LEVEL" diff --git a/cicd/mainnet/start.sh b/cicd/mainnet/start.sh index b6bca08f794e..6bb03e14ffc5 100755 --- a/cicd/mainnet/start.sh +++ b/cicd/mainnet/start.sh @@ -24,6 +24,13 @@ do bootnodes="${bootnodes},$line" fi done < "$input" +#check last line since it's not included in "read" command https://stackoverflow.com/questions/12916352/shell-script-read-missing-last-line +if [ -z "${bootnodes}" ] +then + bootnodes=$line +else + bootnodes="${bootnodes},$line" +fi log_level=3 if test -z "$LOG_LEVEL" diff --git a/cicd/testnet/start.sh b/cicd/testnet/start.sh index e506d1df45ec..6918c7a1ef07 100755 --- a/cicd/testnet/start.sh +++ b/cicd/testnet/start.sh @@ -25,6 +25,13 @@ do bootnodes="${bootnodes},$line" fi done < "$input" +#check last line since it's not included in "read" command https://stackoverflow.com/questions/12916352/shell-script-read-missing-last-line +if [ -z "${bootnodes}" ] +then + bootnodes=$line +else + bootnodes="${bootnodes},$line" +fi log_level=3 if test -z "$LOG_LEVEL"