go-toolbox/scripts/helpers/arch.sh
Stanislav N. aka pztrn 8b945c8f90
All checks were successful
continuous-integration/drone Build is passing
Initial commit.
2024-05-04 13:18:37 +05:00

18 lines
343 B
Bash
Executable File

#!/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