From b5f96ac5292a83b7585e49fafa078580d41d16bf Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Thu, 13 Nov 2008 18:04:51 +0100 Subject: cleaner debugging --- src/core/libs/lib-ui.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index 7f6ef2e..cc80616 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -82,6 +82,22 @@ log () } +debug () +{ + str="[DEBUG] $@" + if [ "$DEBUG" = "1" ] + then + if [ "$var_UI_TYPE" = dia ] + then + echo -e "$str" > $LOG + else + echo -e "$str" + fi + echo -e "$str" >> $LOGFILE + fi +} + + # ask the user a password. return is stored in $PASSWORD or $_PASSWORD # $1 type (optional. eg 'svn', 'ssh'). ask_password () -- cgit v1.2.3-54-g00ecf