From 1221220f7d7ed568aa6b14cc8635541f89906394 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Fri, 3 Feb 2023 19:15:16 +0100 Subject: [PATCH] chore: some reformatting Signed-off-by: Dominik Willner --- scripts/crowsnest.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/scripts/crowsnest.sh b/scripts/crowsnest.sh index f31c13d..b8f6ef8 100644 --- a/scripts/crowsnest.sh +++ b/scripts/crowsnest.sh @@ -70,16 +70,15 @@ function continue_config() { while true; do read -erp "${cyan}###### Continuing with configuration? (y/N):${white} " reply case "${reply}" in - [Yy]* ) - break - ;; - [Nn]* ) + Y|y|Yes|yes) + select_msg "Yes" + break;; + N|n|No|no|"") + select_msg "No" warn_msg "Installation aborted by user ... Exiting!" - exit 1 - ;; - * ) - echo -e "\e[31mERROR: Please type Y or N !\e[0m" - ;; + exit 1;; + *) + error_msg "Invalid Input!\n";; esac done return 0 @@ -93,16 +92,13 @@ function install_crowsnest(){ # Step 2: Clone crowsnest repo status_msg "Cloning 'crowsnest' repository ..." - if [[ ! -d "${HOME}/crowsnest" ]] && - [[ -z "$(ls -A "${HOME}/crowsnest")" ]]; then + if [[ ! -d "${HOME}/crowsnest" && -z "$(ls -A "${HOME}/crowsnest")" ]]; then clone_crowsnest else ok_msg "crowsnest repository already exists ..." fi # Step 3: Install dependencies - # status_msg "Install basic dependencies ..." - # install_basic_deps dependency_check git make # Step 4: Check for Multi Instance @@ -159,7 +155,7 @@ get_crowsnest_status(){ echo "Installed" elif [[ "${count}" -gt 0 ]]; then echo "Incomplete!" - else + else echo "Not installed!" fi }