Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 62 lines (52 sloc) 1.72 KB
# Copyright 2018 OVO Technology
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/sh
#copied almost verbatim from
#https://github.com/nouney/helm-gcs/blob/master/scripts/install.sh
cd $HELM_PLUGIN_DIR
version="$(cat plugin.yaml | grep "version" | cut -d '"' -f 2)"
echo "Installing helm-bulk v${version} ..."
# Find correct archive name
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) os=Linux;;
Darwin*) os=Darwin;;
CYGWIN*) os=Cygwin;;
MINGW*) os=windows;;
*) os="UNKNOWN:${unameOut}"
esac
arch=`uname -m`
url="https://github.com/ovotech/helm-bulk/releases/download/v${version}/helm-bulk_${version}_${os}_${arch}.tar.gz"
if [ "$url" = "" ]
then
echo "Unsupported OS / architecture: ${os}_${arch}"
exit 1
fi
filename=`echo ${url} | sed -e "s/^.*\///g"`
# Download archive
if [ -n $(command -v curl) ]
then
curl -sSL -O $url
elif [ -n $(command -v wget) ]
then
wget -q $url
else
echo "Need curl or wget"
exit -1
fi
# Install bin
rm -rf bin && mkdir bin && tar xzvf $filename -C bin > /dev/null && rm -f $filename
echo "helm-bulk ${version} is correctly installed."
echo
echo "See https://github.com/ovotech/helm-bulk#getting-started for help getting started."
You can’t perform that action at this time.