From 9dd15bc044c733a441b59706cd294bcb586c85d5 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 28 Sep 2022 18:17:56 +0100 Subject: [PATCH] Add option for --auto-yes for running headless --- install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 4d2d025..25c2f13 100755 --- a/install.sh +++ b/install.sh @@ -33,22 +33,22 @@ GREEN='\033[0;32m' PURPLE='\033[0;35m' # Other params +start_time=`date +%s` # Start timer PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds - -# Start timer -start_time=`date +%s` - -# Get system type - Linux / MacOS (Darwin) -system_type=$(uname -s) - -# Get any passed in parameters -params=$* +system_type=$(uname -s) # Get system type - Linux / MacOS (Darwin) +params=$* # Get passed in params # Clear the screen if [[ ! $params == *"--no-clear"* ]]; then clear fi +# If set to auto-yes - then don't wait for user reply +if [[ $params == *"--auto-yes"* ]]; then + PROMPT_TIMEOUT=1 + REPLY='Y' +fi + # Function that prints important text in a banner with colored border # First param is the text to output, then optional color and padding make_banner () {