mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-06-26 12:01:21 +02: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'
|
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 () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user