mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-06-27 12:31:21 +02:00
Add option for no-clear
This commit is contained in:
parent
01bb38c203
commit
961844acb1
13
install.sh
13
install.sh
@ -35,15 +35,20 @@ PURPLE='\033[0;35m'
|
|||||||
# Other params
|
# Other params
|
||||||
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
|
||||||
|
|
||||||
# Clear the screen
|
|
||||||
clear
|
|
||||||
|
|
||||||
# Start timer
|
# Start timer
|
||||||
start_time=`date +%s`
|
start_time=`date +%s`
|
||||||
|
|
||||||
# Get system type - Linux / MacOS (Darwin)
|
# Get system type - Linux / MacOS (Darwin)
|
||||||
system_type=$(uname -s)
|
system_type=$(uname -s)
|
||||||
|
|
||||||
|
# Get any passed in parameters
|
||||||
|
params=$*
|
||||||
|
|
||||||
|
# Clear the screen
|
||||||
|
if [[ ! $params == *"--no-clear"* ]]; then
|
||||||
|
clear
|
||||||
|
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 () {
|
||||||
@ -280,7 +285,7 @@ function finishing_up () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# If --help flag passed in, just show the help menu
|
# If --help flag passed in, just show the help menu
|
||||||
if [[ $* == "--help" ]]; then
|
if [[ $params == *"--help"* ]]; then
|
||||||
make_intro
|
make_intro
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user