From aa17408282b05da92120f5a5bd6021067e95748c Mon Sep 17 00:00:00 2001 From: Brandon High <759848+highb@users.noreply.github.com> Date: Mon, 30 Oct 2023 17:00:20 -0700 Subject: [PATCH] Explicit list of supported arch --- lib/utils.bash | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/utils.bash b/lib/utils.bash index 1cff3aa..0d341e4 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -161,14 +161,22 @@ detect_arch() { if [ "$ARCH" = "unknown" ]; then ARCH="$(uname -m)" if [ $? != 0 ]; then - fail "Unknown architecture. Please provide the architecture by setting \$ARCH." + fail "\$ARCH not provided and could not call uname -m." fi - # Translate to Teleport arch names + # Translate to Teleport arch names/explicit list of supported arch if [ "${ARCH}" == "x86_64" ]; then echo "amd64" - else + elif [ "${ARCH}" == "amd64" ]; then + echo "$ARCH" + elif [ "${ARCH}" == "arm64" ]; then + echo "$ARCH" + elif [ "${ARCH}" == "i386" ]; then echo "$ARCH" + elif [ "${ARCH}" == "armv7" ]; then + echo "$ARCH" + else + fail "Unknown architecture. Please provide the architecture by setting \$ARCH." fi else echo "$ARCH"