]> git.plutz.net Git - lobster/blobdiff - index.cgi
merge from confetti
[lobster] / index.cgi
index ee0d6f7200900df4e43ba1a2347da90fca72006b..40db42b99eb53288fb2494aa7faac2947ee47acd 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -23,6 +23,17 @@ debug() {
   fi
 }
 
+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"
 
@@ -50,7 +61,7 @@ yield_page() {
   printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
   { printf '
        [html [head
-          [title Confetti]
+          [title Lobster]
          [meta name="viewport" content="width=device-width"]
          [link rel="stylesheet" type="text/css" href="/style.css"]
     '
@@ -74,12 +85,12 @@ topdir="/${topdir%%/*}"
 case ${_PATH} in
   /) REDIRECT /cards/
     ;;
-  /export/*.pdf) . "$_EXEC/cgilite/file.sh"
-    FILE "${_DATA}/${_PATH}" "application/pdf"
-    ;;
-  /export/*) . "$_EXEC/cgilite/file.sh"
-    FILE "${_DATA}/${_PATH}"
-    ;;
+#  /export/*.pdf) . "$_EXEC/cgilite/file.sh"
+#    FILE "${_DATA}/${_PATH}" "application/pdf"
+#    ;;
+#  /export/*) . "$_EXEC/cgilite/file.sh"
+#    FILE "${_DATA}/${_PATH}"
+#    ;;
   *)
     if   [ -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}/index.cgi" ]; then
       . "${_EXEC}/${_PATH}/index.cgi"