Created
April 5, 2023 12:39
-
-
Save clemlesne/d38a737689ad120d6bd97312914cfc56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
ARCH_AMD64="${ARCH_AMD64:-x64}" | |
ARCH_ARM32="${ARCH_ARM32:-arm}" | |
ARCH_ARM64="${ARCH_ARM64:-arm64}" | |
SYS_ARCH="$(arch)" | |
if [[ $SYS_ARCH == x86_64 ]]; then | |
SYS_ARCH=$ARCH_AMD64 | |
elif [[ $SYS_ARCH == aarch64 || $SYS_ARCH == arm64 ]]; then | |
SYS_ARCH=$ARCH_ARM64 | |
elif [[ $SYS_ARCH == arm* ]]; then | |
SYS_ARCH=$ARCH_ARM32 | |
else | |
echo 1>&2 "Unsupported architecture $SYS_ARCH" | |
exit 1 | |
fi | |
echo $SYS_ARCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment