From: Paul Hänsch Date: Sun, 19 Jan 2020 17:03:32 +0000 (+0100) Subject: provide debug function X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=245152b9bb6939b087fc622336bfa0dd74149bb2;p=lobster provide debug function --- diff --git a/index.cgi b/index.cgi index 4531b0a..9d9a3e7 100755 --- a/index.cgi +++ b/index.cgi @@ -9,7 +9,15 @@ esac; done [ -z "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}" [ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}" -debug() { :; } +# debug() { +# local dbg=/dev/stderr +# if [ "$#" -gt 0 ]; then +# printf '%s\n' "$@" >>"$dbg" +# else +# tee -a "$dbg" +# fi +# } +debug() { [ "$#" -gt 0 ] && : || cat; } . "$_EXEC/cgilite/cgilite.sh" . "$_EXEC/cgilite/session.sh"