From 2f82ecd7fee9f49be667b789e113baeb6fc4cb71 Mon Sep 17 00:00:00 2001 From: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:57:20 +0100 Subject: [PATCH 1/2] Do not overwrite the env PROFILE_URL --- scripts/dappnode_install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/dappnode_install.sh b/scripts/dappnode_install.sh index 4a556f51..6dbcc278 100755 --- a/scripts/dappnode_install.sh +++ b/scripts/dappnode_install.sh @@ -15,7 +15,10 @@ DAPPNODE_PROFILE="${DAPPNODE_CORE_DIR}/.dappnode_profile" # Get URLs PROFILE_BRANCH=${PROFILE_BRANCH:-"master"} IPFS_ENDPOINT=${IPFS_ENDPOINT:-"http://ipfs.io"} -PROFILE_URL="https://github.com/dappnode/DAppNode/releases/latest/download/dappnode_profile.sh" +# PROFILE_URL env is used to fetch the core packages versions that will be used to build the release in script install method +if [ -z "${PROFILE_URL}" ]; then + PROFILE_URL="https://github.com/dappnode/DAppNode/releases/latest/download/dappnode_profile.sh" +fi DAPPNODE_ACCESS_CREDENTIALS="${DAPPNODE_DIR}/scripts/dappnode_access_credentials.sh" DAPPNODE_ACCESS_CREDENTIALS_URL="https://github.com/dappnode/DAppNode/releases/latest/download/dappnode_access_credentials.sh" WGET="wget -q --show-progress --progress=bar:force" @@ -105,7 +108,7 @@ if [[ -n "$STATIC_IP" ]]; then fi fi -# Load profile +# Loads profile, if not exists it means it is script install so the versions will be fetched from the latest profile [ -f $DAPPNODE_PROFILE ] || ${WGET} -O ${DAPPNODE_PROFILE} ${PROFILE_URL} # shellcheck disable=SC1090 source "${DAPPNODE_PROFILE}" From 308edada4872bf2f769c305e2226172bf208cf8e Mon Sep 17 00:00:00 2001 From: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com> Date: Wed, 17 Apr 2024 16:11:36 +0100 Subject: [PATCH 2/2] use variable expansion --- scripts/dappnode_install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/dappnode_install.sh b/scripts/dappnode_install.sh index 6dbcc278..331a252f 100755 --- a/scripts/dappnode_install.sh +++ b/scripts/dappnode_install.sh @@ -16,9 +16,7 @@ DAPPNODE_PROFILE="${DAPPNODE_CORE_DIR}/.dappnode_profile" PROFILE_BRANCH=${PROFILE_BRANCH:-"master"} IPFS_ENDPOINT=${IPFS_ENDPOINT:-"http://ipfs.io"} # PROFILE_URL env is used to fetch the core packages versions that will be used to build the release in script install method -if [ -z "${PROFILE_URL}" ]; then - PROFILE_URL="https://github.com/dappnode/DAppNode/releases/latest/download/dappnode_profile.sh" -fi +PROFILE_URL=${PROFILE_URL:-"https://github.com/dappnode/DAppNode/releases/latest/download/dappnode_profile.sh"} DAPPNODE_ACCESS_CREDENTIALS="${DAPPNODE_DIR}/scripts/dappnode_access_credentials.sh" DAPPNODE_ACCESS_CREDENTIALS_URL="https://github.com/dappnode/DAppNode/releases/latest/download/dappnode_access_credentials.sh" WGET="wget -q --show-progress --progress=bar:force"