From 961844acb18437997c1abe90f2324d922ac4816c Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 26 Sep 2022 19:40:27 +0100 Subject: [PATCH] Add option for no-clear --- install.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 3f49d8a..4d2d025 100755 --- a/install.sh +++ b/install.sh @@ -35,15 +35,20 @@ PURPLE='\033[0;35m' # Other params PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds -# Clear the screen -clear - # Start timer start_time=`date +%s` # Get system type - Linux / MacOS (Darwin) 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 # First param is the text to output, then optional color and padding make_banner () { @@ -280,7 +285,7 @@ function finishing_up () { } # If --help flag passed in, just show the help menu -if [[ $* == "--help" ]]; then +if [[ $params == *"--help"* ]]; then make_intro exit 0 fi