From bccbda5a0d09d5218db2c7af339794a7eb6ee598 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Feb 2013 18:49:21 +0100 Subject: Implemented more flexible command line parsing --- helper/logging.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'helper') diff --git a/helper/logging.inc b/helper/logging.inc index 2d79c67c..42906e1e 100644 --- a/helper/logging.inc +++ b/helper/logging.inc @@ -11,10 +11,10 @@ LOG_DIR=${ROOT_DIR}/logs mkdir -p "$LOG_DIR" set_quiet () { - if [ "x$DEBUG" != "x1" -a "x$MLTK_QUIET" != "x1" ]; then - exec 6>&1 > "$LOG_DIR/stdout.log" - exec 7>&2 2> "$LOG_DIR/stderr.log" - MLTK_QUIET="1" + if [ "x$MLTK_QUIET" != "x1" ]; then + exec 6>&1 > "$LOG_DIR/stdout.log" + exec 7>&2 2> "$LOG_DIR/stderr.log" + MLTK_QUIET="1" fi } @@ -42,7 +42,7 @@ pwarning () { } pdebug () { - if [ "x$DEBUG" != "x1" ]; then + if [ "x$MLTK_QUIET" = "x1" ]; then echo -e "[DEBUG] $TOOL_STR $@" >&2 else echo -e "\033[38;5;6m[debug]\033[0m $TOOL_STR $@" >&6 -- cgit v1.2.3-55-g7522