From 240e7c891b861904fc03f224b6bf4dafb66f30f7 Mon Sep 17 00:00:00 2001 From: Charadon Date: Thu, 29 Sep 2022 11:28:28 -0400 Subject: setup.sh: Fix interactive mode not correctly setting branch to master --- setup.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'setup.sh') diff --git a/setup.sh b/setup.sh index cbef62b..64d8f78 100755 --- a/setup.sh +++ b/setup.sh @@ -45,13 +45,16 @@ check_config() { ERROR_MSG="not set. Aborting. See -h for help." if [ "$PROJECT_NAME" = "" ]; then - echo "-n $ERROR_MSG" && exit 1 + echo "-n/Name $ERROR_MSG" && exit 1 elif [ "$PROJECT_LOCATION" = "" ]; then - echo "-d $ERROR_MSG" && exit 1 + echo "-d/Install Directory $ERROR_MSG" && exit 1 elif [ "$PROJECT_URL" = "" ]; then - echo "-u $ERROR_MSG" && exit 1 + echo "-u/Git URL $ERROR_MSG" && exit 1 + elif [ "$PROJECT_BRANCH" = "" ]; + then + echo "-b/branch $ERROR_MSG" fi return 0 } @@ -183,6 +186,10 @@ question_gitbranch() { PROJECT_BRANCH="master" printf 'What branch from the Git Repo do you want to use? (Default: %s): ' "$PROJECT_BRANCH" read -r PROJECT_BRANCH + if [ "$PROJECT_BRANCH" = "" ]; + then + PROJECT_BRANCH="master" + fi } question_templates() { -- cgit 1.4.1-2-gfad0