#!/bin/sh # Author : NTT Data AG # Date : 11-05-2023 helm_install=false app_name="" # fetch helm resources # docs: https://helm.sh/docs/intro/install/ install_helm () { curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 chmod 700 get_helm.sh ./get_helm.sh } show_help() { cat < Specify the app name EOF } while [ "$#" -gt 0 ]; do case "$1" in -h|--help) show_help exit 0 ;; -m|--helm) helm_install=true shift ;; -a|--app) if [ "$2" ]; then app_name="$2" shift 2 else echo "Error: Missing argument for $1 option" show_help exit 1 fi ;; *) echo "Error: Unrecognized option $1" show_help exit 1 ;; esac done # Check if --helm was set if [ "$helm_install" = true ]; then echo "Installing helm" # install_helm else echo "Skipping helm" fi # Validate app names if [ -z "$app_name" ]; then echo "Please specify app" else case $app_name in "socks_shop") echo "installing sock shop" ;; *) echo "Only following apps allowed" exit 1 ;; esac fi