Add option for --auto-yes for running headless

This commit is contained in:
Alicia Sykes 2022-09-28 18:17:56 +01:00
parent 7fdae6cc67
commit 9dd15bc044

View File

@ -33,22 +33,22 @@ GREEN='\033[0;32m'
PURPLE='\033[0;35m' PURPLE='\033[0;35m'
# Other params # Other params
start_time=`date +%s` # Start timer
PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds
system_type=$(uname -s) # Get system type - Linux / MacOS (Darwin)
# Start timer params=$* # Get passed in params
start_time=`date +%s`
# Get system type - Linux / MacOS (Darwin)
system_type=$(uname -s)
# Get any passed in parameters
params=$*
# Clear the screen # Clear the screen
if [[ ! $params == *"--no-clear"* ]]; then if [[ ! $params == *"--no-clear"* ]]; then
clear clear
fi 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 # Function that prints important text in a banner with colored border
# First param is the text to output, then optional color and padding # First param is the text to output, then optional color and padding
make_banner () { make_banner () {