Add common tools

This commit is contained in:
2023-05-09 14:16:12 +04:00
parent 930eaaebfb
commit 7200d400f0
11 changed files with 145 additions and 2 deletions

17
scripts/helpers/arch.sh Normal file
View 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