X-Git-Url: http://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=index.cgi;h=af99fe150b67db0149b81858603d69e9a2b1c17d;hp=9c068b54435e49f0d723e318b71a265f796be681;hb=3a43bceff672dae6d391a53a1a12943c207aeff1;hpb=49831f4301899b008b94f590b4c9765f76b4c0f0 diff --git a/index.cgi b/index.cgi index 9c068b5..af99fe1 100755 --- a/index.cgi +++ b/index.cgi @@ -36,7 +36,7 @@ _EXEC="${real%/shcgi/index.cgi}" #execution directory # basic functions debug() { #change to false to disable debugging if [ "$DBG_ENABLED" = true -a -n "$*" ]; then - echo -E "$@" >>"$DBG_FILE" + printf '%s\n' "$*" >>"$DBG_FILE" elif [ "$DBG_ENABLED" = true -a -z "$*" ]; then tee -a "$DBG_FILE" elif [ -z "$*" ]; then @@ -45,8 +45,8 @@ debug() { #change to false to disable debugging } die() { - debug "$@" - echo -E "$@" >>/dev/stderr + debug FATAL: "$*" + printf '%s\n' "$*" >&2 exit 1 } @@ -76,8 +76,6 @@ cgi_get if [ -n "$_GET[\"action\"]" ]; then . "$_EXEC/shcgi/action.sh" -elif [ -n "$_GET[\"export\"]" ]; then - . "$_EXEC/shcgi/export.sh" else . "$_EXEC/shcgi/page.sh" fi