Add common tools
This commit is contained in:
17
scripts/helpers/arch.sh
Normal file
17
scripts/helpers/arch.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/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
|
Reference in New Issue
Block a user