]> git.plutz.net Git - cgilite/commitdiff
rudimentary debug function
authorPaul Hänsch <paul@plutz.net>
Wed, 24 Jun 2020 10:02:33 +0000 (12:02 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 24 Jun 2020 10:02:33 +0000 (12:02 +0200)
cgilite.sh

index f03f74732165e4d672418d3718ecc228db4ac53d..2e538324c0a8b5ec45f6fb2235f254fcf359db22 100755 (executable)
@@ -27,6 +27,8 @@ BR='
 '
 cgilite_timeout=2
 
+debug(){ [ $# -gt 0 ] && printf '%s\n' "$@" >&2 || tee -a /dev/stderr; }
+
 PATH(){ 
   local str seg out
   [ $# -eq 0 ] && str="$(cat)" || str="$*"