From e4e11ad81fd3cd349f9cb01ea3aeaef78e0517f9 Mon Sep 17 00:00:00 2001 From: Andy Witter Date: Tue, 17 Dec 2019 17:22:53 -0500 Subject: [PATCH] Add a command line option for those of us who value their time --- GenaSYS.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/GenaSYS.sh b/GenaSYS.sh index 1c70b0b..8edfd2c 100755 --- a/GenaSYS.sh +++ b/GenaSYS.sh @@ -18,7 +18,6 @@ ########################################################################## - # ######################################################################## NAME_="GenaSYS" @@ -36,15 +35,20 @@ COMMENTS_="Generates system and opensrf config files for Evergreen clusters" # ############################################################################# - Usage () { ### Display Usage echo ; echo >&2 "Usage: $0 [-c config file] [-h] help" ; echo } -while getopts c:nh OPTIONS +dont_waste_my_time() { + sleep() { + echo + } +} +while getopts c:nhd OPTIONS do case "$OPTIONS" in c) CONFIG_FILE="$OPTARG";; n) NOSPLASH="1";; + d) NOSPLASH="1";BLOW_PAST="1";dont_waste_my_time;; h) Usage ; exit 1;; [?]) Usage ; exit 2;; esac @@ -182,6 +186,7 @@ echo echo "[1] - I ACCEPT the terms of this license." echo "[2] - I DO NOT ACCEPT the terms of this license." echo + select yn in "Yes" "No"; do case $yn in Yes ) echo ; echo -e $COL_BR_GREEN" License accepted..."$COL_RESET; sleep 1 ; break;; @@ -236,7 +241,7 @@ echo echo "Please read the following installation notes or" echo "you're gonna be real messed up...." echo -e $COL_RESET -read -p "Press [Enter] to continue" ENTER +[ "$BLOW_PAST" == "1" ] || read -p "Press [Enter] to continue" ENTER echo echo -e ${COL_BR_CYAN}"1 __Library IP based redirection:"$COL_RESET echo "If you are going be using Library based redirection then" @@ -292,7 +297,7 @@ echo -e "to the"${COL_YELLOW} "${CUSTOMDIR}" ${COL_RESET} directory. sleep 3 echo echo -e "Press ${COL_BR_CYAN}[Enter]${COL_RESET} to continue or ${COL_BR_CYAN}[Ctrl-C]${COL_RESET} to quit now" -read -p "if you need to do any of the above." ENTER +[ "$BLOW_PAST" == "1" ] || read -p "if you need to do any of the above." ENTER -- 2.11.0