From fe90753a37f646f61427e3bc605726783fa56cd1 Mon Sep 17 00:00:00 2001 From: amir-climy Date: Thu, 21 May 2026 14:59:32 +0800 Subject: [PATCH] feat(install): detect and display host architecture (amd64/arm64) Uses uname -m to detect x86_64/aarch64 and maps to the OCI arch name. Printed at startup so users can confirm the correct image variant will be pulled. Fails early on unsupported architectures. Co-Authored-By: Claude Sonnet 4.6 --- manage-server/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manage-server/install.sh b/manage-server/install.sh index 7f66d9e..8a76037 100755 --- a/manage-server/install.sh +++ b/manage-server/install.sh @@ -38,6 +38,14 @@ done [[ $EUID -eq 0 ]] || die "must run as root" +# ── architecture detection ─────────────────────────────────────────────── +case "$(uname -m)" in + x86_64) ARCH=amd64 ;; + aarch64) ARCH=arm64 ;; + *) die "unsupported architecture: $(uname -m) (supported: x86_64, aarch64)" ;; +esac +info "architecture: linux/$ARCH" + # ── runtime detection ──────────────────────────────────────────────────── if command -v podman-compose >/dev/null 2>&1; then COMPOSE=(podman-compose)