summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-13 18:04:51 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-13 18:04:51 +0100
commitb5f96ac5292a83b7585e49fafa078580d41d16bf (patch)
treec02666b36d9e9cb7d2ccf813f006f9353816960e /src
parentbb0ce215ce5f96e76037e22663287de80c6220c3 (diff)
cleaner debugging
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-ui.sh16
1 files changed, 16 insertions, 0 deletions
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 $<TYPE>_PASSWORD
# $1 type (optional. eg 'svn', 'ssh').
ask_password ()