[ -z "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}"
[ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"
-# debug() {
-# local dbg=/dev/stderr
-# if [ "$#" -gt 0 ]; then
-# printf '%s\n' "$@" >>"$dbg"
-# else
-# tee -a "$dbg"
-# fi
-# }
-debug() { [ "$#" -gt 0 ] && : || cat; }
+debug() {
+ local dbg=/dev/stderr
+ if [ ! "$DEBUG" ]; then
+ [ "$#" -gt 0 ] && : || cat;
+ elif [ "$#" -gt 0 ]; then
+ printf '%s\n' "$@" >>"$dbg"
+ else
+ tee -a "$dbg"
+ fi
+}
. "$_EXEC/cgilite/cgilite.sh"
. "$_EXEC/cgilite/session.sh"