From 75222ff889d6fd869873758e520e4795ad2483dd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 26 Nov 2008 20:37:01 +0100 Subject: pkg: debug: print to stderr, ignore SILENT --- bin/pkg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pkg b/bin/pkg index a994354..1ef3ac1 100755 --- a/bin/pkg +++ b/bin/pkg @@ -25,14 +25,14 @@ error=$'\e[0;31m' reset=$'\e[0m' function debug { - if (( !DEBUG )) || (( SILENT )); then return; fi + (( DEBUG )) || return typeset func line if [[ ${#*} -ge 3 ]] { func=$1 line=$2 shift 2 } - echo "(debug) $func:$line: $*" + echo "(debug) $func:$line: $*" >&2 } # I need function name and line number of the function _calling_ debug, -- cgit v1.2.3