helm-docker/install.sh

38 lines
543 B
Bash
Raw Permalink Normal View History

2022-01-29 21:14:27 +00:00
#!/bin/sh
2022-01-31 18:40:11 +00:00
set -xe
2022-01-29 21:14:27 +00:00
BASE_URL=https://get.helm.sh
if [ -z ${VERSION+x} ]; then
echo ${VERSION} not defined
exit 1
fi
case `uname -m` in
x86_64)
ARCH=amd64
;;
armv7l)
ARCH=arm
;;
aarch64)
ARCH=arm64
;;
ppc64le)
ARCH=ppc64le
;;
s390x)
ARCH=s390x
;;
*)
echo "un-supported arch, exit ..."
exit 1
;;
esac
apk add --update --no-cache wget git
wget ${BASE_URL}/helm-${VERSION}-linux-${ARCH}.tar.gz -O - | tar -xz
2022-01-29 21:14:27 +00:00
mv linux-${ARCH}/helm /usr/bin/helm
chmod +x /usr/bin/helm
rm -rf linux-${ARCH}