File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
12set -euo pipefail
23
34# ## generate pgpass file
3132
3233
3334 DB_MAX_BLOCK=$( psql -h $PGHOST $PGDATABASE -U $PGUSER -t -c ' select max (block_no) from block;' )
34- NODE_CUR_BLOCK=0
35- while [ $NODE_CUR_BLOCK -lt $DB_MAX_BLOCK ]; do
35+ NODE_CUR_BLOCK=" 0 "
36+ while [ " $NODE_CUR_BLOCK " -lt " $DB_MAX_BLOCK " ]; do
3637 NODE_STATUS=" $( cardano-cli query tip --mainnet 2> /dev/null || true) "
3738 NODE_CUR_BLOCK=" $( jq -e -r ' .block' <<< " $NODE_STATUS" 2> /dev/null || true) "
3839 echo " Waiting... Sync progress at $NODE_CUR_BLOCK /$DB_MAX_BLOCK "
@@ -54,7 +55,7 @@ CONFIG_HOME="/environments"
5455if [ -z " ${NETWORK:- } " ]; then
5556 echo " NETWORK is not set, defaulting to mainnet"
5657 NETWORK=" mainnet"
57- NO_NETWORK_SET=1
58+ NO_NETWORK_SET=" 1 "
5859else
5960 echo " NETWORK is set to $NETWORK "
6061fi
7677if [[ -z " ${DB_SYNC_CONFIG:- } " ]]; then
7778 DB_SYNC_CONFIG=" $CONFIG_HOME /$NETWORK "
7879
79- elif [[ -z " ${NO_NETWORK_SET} " ]]; then # dbsync config is set and network is not
80+ elif [[ -z " ${NO_NETWORK_SET:- } " ]]; then # dbsync config is set and network is not
8081 DB_SYNC_CONFIG=" $CONFIG_HOME "
8182
8283else # # both NETWORK and DB_SYNC_CONFIG are set
You can’t perform that action at this time.
0 commit comments