mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-01-25 13:28:35 +01:00
Add option for --auto-yes for running headless
This commit is contained in:
parent
7fdae6cc67
commit
9dd15bc044
18
install.sh
18
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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user