add --install-dir and --binary-name to get-helm script

Signed-off-by: Jack Francis <jackfrancis@gmail.com>
pull/10841/head
Jack Francis 2 years ago
parent e9a2e42ab1
commit 2935ca98be

@ -183,6 +183,8 @@ help () {
echo -e "\t[--version|-v <desired_version>]"
echo -e "\te.g. --version v2.4.0 or -v latest"
echo -e "\t[--no-sudo] ->> install without sudo"
echo -e "\t[--install-dir] <install_destination_filepath> ->> install helm binary to a specific directory, e.g., /usr/bin"
echo -e "\t[--binary-name] <binary_filename> ->> name of helm binary, e.g., helm-v3.8.1"
}
# cleanup temporary files to avoid https://github.com/helm/helm/issues/2977
@ -215,6 +217,24 @@ while [[ $# -gt 0 ]]; do
'--no-sudo')
USE_SUDO="false"
;;
'--install-dir')
shift
if [[ $# -ne 0 ]]; then
export HELM_INSTALL_DIR="${1}"
else
echo -e "Please provide the desired installation directory. e.g. --install-dir /usr/bin"
exit 0
fi
;;
'--binary-name')
shift
if [[ $# -ne 0 ]]; then
export BINARY_NAME="${1}"
else
echo -e "Please provide the desired binary name. e.g. --binary-name helm-v3.8.1"
exit 0
fi
;;
'--help'|-h)
help
exit 0

@ -265,6 +265,8 @@ help () {
echo -e "\t[--version|-v <desired_version>] . When not defined it fetches the latest release from GitHub"
echo -e "\te.g. --version v3.0.0 or -v canary"
echo -e "\t[--no-sudo] ->> install without sudo"
echo -e "\t[--install-dir] <install_destination_filepath> ->> install helm binary to a specific directory, e.g., /usr/bin"
echo -e "\t[--binary-name] <binary_filename> ->> name of helm binary, e.g., helm-v3.8.1"
}
# cleanup temporary files to avoid https://github.com/helm/helm/issues/2977
@ -302,6 +304,24 @@ while [[ $# -gt 0 ]]; do
'--no-sudo')
USE_SUDO="false"
;;
'--install-dir')
shift
if [[ $# -ne 0 ]]; then
export HELM_INSTALL_DIR="${1}"
else
echo -e "Please provide the desired installation directory. e.g. --install-dir /usr/bin"
exit 0
fi
;;
'--binary-name')
shift
if [[ $# -ne 0 ]]; then
export BINARY_NAME="${1}"
else
echo -e "Please provide the desired binary name. e.g. --binary-name helm-v3.8.1"
exit 0
fi
;;
'--help'|-h)
help
exit 0

Loading…
Cancel
Save