script: fix `linux` download path

pull/291/head
MaxMustermann2 2 years ago
parent f7c9e07182
commit 00d1ed370e
No known key found for this signature in database
GPG Key ID: 4F4AB9DB6FF24C94
  1. 15
      scripts/hmy.sh

@ -20,12 +20,15 @@ set_download () {
local rel='mainnet' local rel='mainnet'
case "$OS" in case "$OS" in
Darwin) Darwin)
FOLDER=release/darwin-x86_64/${rel}/ FOLDER=release/darwin-x86_64/${rel}
URL=http://${BUCKET}.s3.amazonaws.com/${FOLDER}
BIN=( hmy libbls384_256.dylib libcrypto.1.0.0.dylib libgmp.10.dylib libgmpxx.4.dylib libmcl.dylib ) BIN=( hmy libbls384_256.dylib libcrypto.1.0.0.dylib libgmp.10.dylib libgmpxx.4.dylib libmcl.dylib )
NAMES=("${BIN[@]}")
;; ;;
Linux) Linux)
FOLDER=release/linux-x86_64/${rel}/ URL=https://harmony.one
BIN=( hmy ) BIN=( hmycli )
NAMES=( hmy )
;; ;;
*) *)
echo "${OS} not supported." echo "${OS} not supported."
@ -36,9 +39,9 @@ set_download () {
do_download () { do_download () {
# download all the binaries # download all the binaries
for bin in "${BIN[@]}"; do for i in "${!BIN[@]}"; do
rm -f ${bin} rm -f ${NAMES[i]}
curl http://${BUCKET}.s3.amazonaws.com/${FOLDER}${bin} -o ${bin} curl -L ${URL}/${BIN[i]} -o ${NAMES[i]}
done done
chmod +x hmy chmod +x hmy
} }

Loading…
Cancel
Save