From 6665c72c2ffbeafab08af11b6791c0e4ce7f5879 Mon Sep 17 00:00:00 2001 From: maaaace Date: Sun, 3 May 2020 19:22:09 +0800 Subject: [PATCH] fix(shellScript): download correct consul zip for arm64 processor ci_install_consul.sh just downloads the consul for amd64, which cannot be executed on arm64 architecture processors. Add achitecture checking in this script to support downloading correct binary file. Signed-off-by: maaaace --- src/main/bash/ci_install_consul.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/bash/ci_install_consul.sh b/src/main/bash/ci_install_consul.sh index 9486345b..6d03bff9 100755 --- a/src/main/bash/ci_install_consul.sh +++ b/src/main/bash/ci_install_consul.sh @@ -1,7 +1,11 @@ #!/bin/bash CONSUL_VER="1.7.2" -CONSUL_ZIP="consul_${CONSUL_VER}_linux_amd64.zip" +PLATFORM="amd64" +if [ "$(uname -m)" == aarch64 ]; then + PLATFORM="arm64" +fi +CONSUL_ZIP="consul_${CONSUL_VER}_linux_${PLATFORM}.zip" IGNORE_CERTS="${IGNORE_CERTS:-no}" # cleanup