From b0900fe25a7bb262c62119cd13f78fb79d2101ba Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Wed, 2 Mar 2022 19:36:10 +0100 Subject: [PATCH] build(update-appup): fix ARCH resolution --- scripts/update-appup.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/update-appup.sh b/scripts/update-appup.sh index e1ef0c3c0..db0759695 100755 --- a/scripts/update-appup.sh +++ b/scripts/update-appup.sh @@ -41,18 +41,20 @@ shift 1 ESCRIPT_ARGS="$*" SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}" -ARCH="${ARCH:-$(uname -m)}" -case "$ARCH" in - x86_64) - ARCH='amd64' - ;; - aarch64) - ARCH='arm64' - ;; - arm*) - ARCH=arm - ;; -esac +if [ -z "${ARCH:-}" ]; then + UNAME="$(uname -m)" + case "$UNAME" in + x86_64) + ARCH='amd64' + ;; + aarch64) + ARCH='arm64' + ;; + arm*) + ARCH='arm' + ;; + esac +fi PACKAGE_NAME="${PROFILE}-${SYSTEM}-${PREV_VERSION}-${ARCH}.zip" DOWNLOAD_URL="https://www.emqx.com/downloads/${DIR}/v${PREV_VERSION}/${PACKAGE_NAME}"