Skip to content

Commit

Permalink
Use strip-components argument and remove 'bin/' folder creation
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Apr 9, 2024
1 parent 7cda578 commit 7303cca
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/cnode-helper-scripts/guild-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
}

Expand Down

0 comments on commit 7303cca

Please sign in to comment.