mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-30 02:28:53 +00:00
1cf325d5c5
Verify that the target image architecture matches what is expected according to the balena app architecture. Change-type: patch
25 lines
249 B
Bash
Executable File
25 lines
249 B
Bash
Executable File
#!/bin/sh
|
|
# detect-arch.sh
|
|
|
|
apk_arch=$(apk --print-arch)
|
|
case $apk_arch in
|
|
x86_64)
|
|
printf "amd64"
|
|
;;
|
|
aarch64)
|
|
printf "aarch64"
|
|
;;
|
|
armv7)
|
|
printf "armv7hf"
|
|
;;
|
|
armhf)
|
|
printf "rpi"
|
|
;;
|
|
x86)
|
|
printf "i386"
|
|
;;
|
|
*)
|
|
printf "%s" "$apk_arch"
|
|
;;
|
|
esac
|