From 2e693530293ea6ee484b4270ad60ee06d3c43ebd Mon Sep 17 00:00:00 2001 From: Daniel Mikula Date: Wed, 17 May 2023 07:53:11 +0200 Subject: [PATCH] reordered app name check --- setup.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/setup.sh b/setup.sh index 85da66a..7a153d7 100755 --- a/setup.sh +++ b/setup.sh @@ -96,6 +96,21 @@ while [ "$#" -gt 0 ]; do esac done +# Validate app names +if [ -z "$app_name" ]; then + echo "Please specify app" +else + case $app_name in + "sock_shop") + echo "$app_name OK" + ;; + *) + show_allowed_apps + exit 1 + ;; + esac +fi + # Check if --helm was set if [ "$helm_install" = true ]; then install_helm @@ -109,18 +124,5 @@ install_git echo "Installing K3S" install_k3s -# Validate app names -if [ -z "$app_name" ]; then - echo "Please specify app" -else - case $app_name in - "sock_shop") - echo "Installing sock shop" - install_sock_shop - ;; - *) - show_allowed_apps - exit 1 - ;; - esac -fi \ No newline at end of file +echo "Installing $app_name" +install_sock_shop \ No newline at end of file