diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2010-04-04 14:06:36 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-04-04 14:06:36 +0200 |
commit | ac213ae1364cad272ac9bbebc1c29c0380da7047 (patch) | |
tree | 69bf392c8722c7cd120e8fc3459291da0a3da540 /libui.sh | |
parent | 5dd2b063e4ce1758d38020fa80210ac79451c0ed (diff) |
fix argument checking in debug()
Diffstat (limited to 'libui.sh')
-rw-r--r-- | libui.sh | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -131,11 +131,12 @@ log () debug () { [ "$LIBUI_DEBUG" = "1" ] || return; + [ -n "$1" ] || die error "you must specify at least one (non-empty) debug category" + [ -n "$2" ] || die_error "debug \$2 cannot be empty" for cat in $1 do check_is_in $cat "${LIBUI_DEBUG_CATEGORIES[@]}" || die_error "debug \$1 contains a value ($cat) which is not a valid debug category" done - [ -n "$2" ] || die_error "debug \$2 cannot be empty" for file in "${LIBUI_LOG_FILE[@]}"; do dir=$(dirname $file) mkdir -p $dir || die_error "Cannot create log directory $dir" |