diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-13 18:04:51 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-13 18:04:51 +0100 |
commit | b5f96ac5292a83b7585e49fafa078580d41d16bf (patch) | |
tree | c02666b36d9e9cb7d2ccf813f006f9353816960e /src | |
parent | bb0ce215ce5f96e76037e22663287de80c6220c3 (diff) |
cleaner debugging
Diffstat (limited to 'src')
-rw-r--r-- | src/core/libs/lib-ui.sh | 16 |
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 () |