Files
argo-cd/hack/install.sh
Sam Ding b760a2786f chore: Support build on s390x and ppc64le (follow #6441) (#8890)
* Support build on s390x and ppc64le

Signed-off-by: Sam Ding <samding@ca.ibm.com>
2022-04-22 13:26:10 -07:00

28 lines
772 B
Bash
Executable File

#!/bin/bash
set -eux -o pipefail
export DOWNLOADS=/tmp/dl
export BIN=${BIN:-/usr/local/bin}
mkdir -p $DOWNLOADS
ARCHITECTURE=""
case $(uname -m) in
x86_64) ARCHITECTURE="amd64" ;;
arm64) ARCHITECTURE="arm64" ;;
ppc64le) ARCHITECTURE="ppc64le" ;;
s390x) ARCHITECTURE="s390x" ;;
arm|armv7l|armv8l|aarch64) dpkg --print-architecture | grep -q "arm64" && ARCHITECTURE="arm64" || ARCHITECTURE="arm" ;;
esac
INSTALL_OS=""
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) INSTALL_OS=linux;;
Darwin*) INSTALL_OS=darwin;;
esac
for product in $*; do
ARCHITECTURE=$ARCHITECTURE INSTALL_OS=$INSTALL_OS "$(dirname $0)/installers/install-${product}.sh"
done