Detect supported architecture during node bootstrap

This commit is contained in:
Ciprian Hacman 2020-05-30 16:37:42 +03:00
parent 33c242c896
commit 41defca8fe
1 changed files with 11 additions and 0 deletions

View File

@ -137,6 +137,17 @@ function try-download-release() {
}
function download-release() {
case "$(uname -m)" in
x86_64*|i?86_64*|amd64*)
NODEUP_URL="${NODEUP_URL}"
NODEUP_HASH="${NODEUP_HASH}"
;;
*)
echo "Unsupported host arch: $(uname -m)" >&2
exit 1
;;
esac
# In case of failure checking integrity of release, retry.
cd ${INSTALL_DIR}/bin
until try-download-release; do