X-Git-Url: http://git.plutz.net/?p=shcgi;a=blobdiff_plain;f=index.cgi;h=af99fe150b67db0149b81858603d69e9a2b1c17d;hp=fada33d28e5e7a0bcb09a2e462f5e19ce2646023;hb=3a43bceff672dae6d391a53a1a12943c207aeff1;hpb=2dcd6204f2dea253ee0373f616c77ad75026df15 diff --git a/index.cgi b/index.cgi index fada33d..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 }