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} rm -f ${bin}
done done
# download all the binaries download_binaries() {
for bin in "${BIN[@]}"; do local outdir
curl http://${BUCKET}.s3.amazonaws.com/${FOLDER}${bin} -o ${bin} outdir="${1:-.}"
done mkdir -p "${outdir}"
chmod +x harmony 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 NODE_PORT=9000
PUB_IP= PUB_IP=

Loading…
Cancel
Save