Factor binary download as a function

pull/1046/head
Eugene Kim 6 years ago
parent cb296b6336
commit 11c8d05c62
  1. 17
      scripts/node.sh

@ -147,11 +147,18 @@ for bin in "${BIN[@]}"; do
rm -f ${bin}
done
# download all the binaries
for bin in "${BIN[@]}"; do
curl http://${BUCKET}.s3.amazonaws.com/${FOLDER}${bin} -o ${bin}
done
chmod +x harmony
download_binaries() {
local outdir
outdir="${1:-.}"
mkdir -p "${outdir}"
for bin in "${BIN[@]}"; do
curl http://${BUCKET}.s3.amazonaws.com/${FOLDER}${bin} -o "${outdir}/${bin}" || return $?
done
chmod +x "${outdir}/harmony"
(cd "${outdir}" && exec openssl sha256 "${BIN[@]}") > "${outdir}/checksums.txt"
}
download_binaries # for the first time
NODE_PORT=9000
PUB_IP=

Loading…
Cancel
Save