Skip to content

Commit

Permalink
Unset CNODE_HOME if set already in prereqs, move branch variable defi…
Browse files Browse the repository at this point in the history
…nition lower
  • Loading branch information
rdlrt committed Oct 15, 2020
1 parent 830356e commit 6538c01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/cnode-helper-scripts/prereqs.sh
Expand Up @@ -48,15 +48,14 @@ EOF
}

# Initialize defaults
unset CNODE_HOME
INTERACTIVE='N'
NETWORK='mainnet'
WANT_BUILD_DEPS='Y'
FORCE_OVERWRITE='N'
LIBSODIUM_FORK='N'
CNODE_NAME='cnode'
CURL_TIMEOUT=60
[[ -f "${CNODE_HOME}"/scripts/.env_branch ]] && BRANCH="$(cat ${CNODE_HOME}/scripts/.env_branch)" || BRANCH="master"


while getopts :in:sflt:m:b: opt; do
case ${opt} in
Expand All @@ -80,6 +79,8 @@ G_ID=$(id -g)
CNODE_PATH="/opt/cardano"
CNODE_HOME=${CNODE_PATH}/${CNODE_NAME}
CNODE_VNAME=$(echo "$CNODE_NAME" | awk '{print toupper($0)}')
[[ -z "${BRANCH}" && -f "${CNODE_HOME}"/scripts/.env_branch ]] && BRANCH="$(cat ${CNODE_HOME}/scripts/.env_branch)" || BRANCH="master"

REPO="https://github.com/cardano-community/guild-operators"
REPO_RAW="https://raw.githubusercontent.com/cardano-community/guild-operators"

Expand Down

0 comments on commit 6538c01

Please sign in to comment.