go-toolbox/scripts/helpers/arch.sh

18 lines
343 B
Bash
Raw Permalink Normal View History

2024-05-04 13:18:37 +05:00
#!/bin/bash
# shellcheck disable=SC2034
# Line above disables shellcheck linters:
# * SC2043 - unused variable (this file sourced elsewhere).
base_arch=$(uname -m)
arch=""
if [ "$base_arch" = "x86_64" ]; then
arch=amd64
elif [ "$base_arch" = "aarch64" ]; then
arch=arm64
else
echo "unknown arch"
exit 1
fi