From 245152b9bb6939b087fc622336bfa0dd74149bb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sun, 19 Jan 2020 18:03:32 +0100 Subject: [PATCH] provide debug function --- index.cgi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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" -- 2.39.2