argo-cd/hack/install.sh
Jesse Suen 63e70a9f71
chore: portable and simpler toolchain install (#7920)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2021-12-16 15:16:36 -08:00

23 lines
609 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" ;;
arm|armv7l|armv8l|aarch64) dpkg --print-architecture | grep -q "arm64" && ARCHITECTURE="arm64" || ARCHITECTURE="arm" ;;
esac
if [ -z "$ARCHITECTURE" ]; then
echo "Could not detect the architecture of the system"
exit 1
fi
for product in $*; do
ARCHITECTURE=$ARCHITECTURE "$(dirname $0)/installers/install-${product}.sh"
done