Choose the right architecture in bin/linkerd script (#4867)

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
This commit is contained in:
Kevin Leimkuhler 2020-08-13 11:03:08 -07:00 committed by GitHub
parent 66d2c6b74b
commit c0826dcedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 1 deletions

View File

@ -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