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'
# 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 () {