From c0826dcedc292f581adbc1fe2007af142e92acb8 Mon Sep 17 00:00:00 2001 From: Kevin Leimkuhler Date: Thu, 13 Aug 2020 11:03:08 -0700 Subject: [PATCH] Choose the right architecture in bin/linkerd script (#4867) Signed-off-by: Kevin Leimkuhler --- bin/linkerd | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/bin/linkerd b/bin/linkerd index 5a7f70af5..94c40f21e 100755 --- a/bin/linkerd +++ b/bin/linkerd @@ -10,7 +10,29 @@ system=$(uname -s) if [ "$system" = Darwin ]; then bin=$rootdir/target/cli/darwin/linkerd elif [ "$system" = Linux ]; then - bin=$rootdir/target/cli/linux/linkerd + arch=$(uname -m) + case $arch in + x86_64) + arch=amd64 + ;; + armv8*) + arch=arm64 + ;; + aarch64*) + arch=arm64 + ;; + armv*) + arch=arm + ;; + amd64|arm64) + arch=$arch + ;; + *) + echo "unsupported architecture: $arch" >&2 + exit 1 + ;; + esac + bin=$rootdir/target/cli/linux-$arch/linkerd else echo "unknown system: $system" >&2 exit 1