summaryrefslogtreecommitdiffstats
path: root/helper/logging.inc
diff options
context:
space:
mode:
authorSimon Rettberg2013-02-26 18:49:21 +0100
committerSimon Rettberg2013-02-26 18:49:21 +0100
commitbccbda5a0d09d5218db2c7af339794a7eb6ee598 (patch)
tree31521f2bf4a4e302166dcb538aa2dc0a92b8c388 /helper/logging.inc
parentAdded dependency system for modules (REQUIRED_MODULES var in *.conf of module... (diff)
downloadtm-scripts-bccbda5a0d09d5218db2c7af339794a7eb6ee598.tar.gz
tm-scripts-bccbda5a0d09d5218db2c7af339794a7eb6ee598.tar.xz
tm-scripts-bccbda5a0d09d5218db2c7af339794a7eb6ee598.zip
Implemented more flexible command line parsing
Diffstat (limited to 'helper/logging.inc')
-rw-r--r--helper/logging.inc10
1 files changed, 5 insertions, 5 deletions
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