Skip to content

Commit

Permalink
Explicit list of supported arch
Browse files Browse the repository at this point in the history
  • Loading branch information
highb committed Oct 31, 2023
1 parent 03ab091 commit aa17408
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit aa17408

Please sign in to comment.