From 7303cca6d154196b0590170cc965e6b9ab12338c Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:54:16 +1000 Subject: [PATCH] Use strip-components argument and remove 'bin/' folder creation --- scripts/cnode-helper-scripts/guild-deploy.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index 3eb02b3db..181fca400 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -372,23 +372,23 @@ download_cnodebins() { echo -e "\n Downloading Cardano Node archive created from GitHub.." rm -f cardano-node cardano-address curl -m 200 -sfL https://github.com/intersectmbo/cardano-node/releases/download/${CARDANO_NODE_VERSION}/cardano-node-${CARDANO_NODE_VERSION}-linux.tar.gz -o cnode.tar.gz || err_exit " Could not download cardano-node release ${CARDANO_NODE_VERSION} from GitHub!" - tar zxf cnode.tar.gz ./bin/cardano-node ./bin/cardano-cli ./bin/cardano-submit-api ./bin/bech32 &>/dev/null + tar zxf cnode.tar.gz --strip-components 2 ./bin/cardano-node ./bin/cardano-cli ./bin/cardano-submit-api ./bin/bech32 &>/dev/null rm -f cnode.tar.gz - [[ -f ./bin/cardano-node ]] || err_exit " cardano-node archive downloaded but binary (bin/cardano-node) not found after extracting package!" + [[ -f cardano-node ]] || err_exit " cardano-node archive downloaded but binary (cardano-node) not found after extracting package!" echo -e "\n Downloading Github release package for Cardano Wallet" curl -m 200 -sfL https://github.com/intersectmbo/cardano-addresses/releases/download/3.12.0/cardano-addresses-3.12.0-linux64.tar.gz -o caddress.tar.gz || err_exit " Could not download cardano-wallet's latest release archive from GitHub!" - tar zxf caddress.tar.gz bin/cardano-address &>/dev/null + tar zxf caddress.tar.gz --strip-components 1 bin/cardano-address &>/dev/null rm -f caddress.tar.gz - [[ -f ./bin/cardano-address ]] || err_exit " cardano-address archive downloaded but binary (bin/cardano-address) not found after extracting package!" + [[ -f cardano-address ]] || err_exit " cardano-address archive downloaded but binary (cardano-address) not found after extracting package!" if [[ "${SKIP_DBSYNC_DOWNLOAD}" == "N" ]]; then echo -e "\n Downloading Cardano DB Sync archive created from GitHub.." - curl -m 200 -sfL https://github.com/intersectmbo/cardano-db-sync/releases/download/sancho-3-0-0/cardano-db-sync-13.2.0.0-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.0 from GitHub!" - tar zxf cnodedbsync.tar.gz ./cardano-db-sync &>/dev/null + curl -m 200 -sfL https://github.com/intersectmbo/cardano-db-sync/releases/download/sancho-4.1.0/cardano-db-sync-13.2.0.1-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.0 from GitHub!" + tar zxf cnodedbsync.tar.gz --strip-components 1 ./cardano-db-sync &>/dev/null [[ -f cardano-db-sync ]] || err_exit " cardano-db-sync archive downloaded but binary (cardano-db-sync) not found after extracting package!" rm -f cnodedbsync.tar.gz mv -f -t "${HOME}"/.local/bin cardano-db-sync fi - mv -f -t "${HOME}"/.local/bin bin/cardano-node bin/cardano-cli bin/cardano-submit-api bin/bech32 bin/cardano-address + mv -f -t "${HOME}"/.local/bin cardano-node cardano-cli cardano-submit-api bech32 cardano-address chmod +x "${HOME}"/.local/bin/* }