From 6acf0ad03139e280475a2a101e334b72971f65bb Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Tue, 16 May 2023 01:43:16 +0200 Subject: [PATCH] added no color option to run script --- run.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) mode change 100755 => 100644 run.sh diff --git a/run.sh b/run.sh old mode 100755 new mode 100644 index 9d5059bc..cf66152e --- a/run.sh +++ b/run.sh @@ -19,6 +19,7 @@ Where: } MODE="FOREGROUND" +GRADLE_COLOR="--console=rich" until [[ $# -eq 0 ]]; do case "$1" in @@ -32,6 +33,11 @@ until [[ $# -eq 0 ]]; do shift ;; + --no-color) + GRADLE_COLOR="--no-color" + shift + ;; + -h|--help) printHelp exit 0 @@ -88,7 +94,7 @@ if [[ -d "./hal-core/src" ]]; then echo "INFO: Operating in source directory, will build Hal." INSTALL_DIR="./build/install/Hal" - ./gradlew --console=rich installDist + ./gradlew ${GRADLE_COLOR} installDist EXIT_CODE=$? if [[ ${EXIT_CODE} -ne 0 ]]; then @@ -111,14 +117,14 @@ if [[ ${MODE} == "FOREGROUND" ]]; then while [[ ${EXIT_CODE} -eq 200 ]]; do # Restart as long as we have a exit code of 200, this allows the application to restart itself #startHal - ./gradlew run + ./gradlew ${GRADLE_COLOR} run EXIT_CODE=$? done elif [[ ${MODE} == "BACKGROUND" ]]; then # Kill current session screen -S hal -X kill # Start new session - screen -S hal -L -d -m $(dirname "$0")/run.sh --foreground + screen -S hal -L -d -m $(dirname "$0")/run.sh --foreground --no-color echo "-------------------------" screen -list