]> git.plutz.net Git - confetti/blobdiff - index.cgi
improved styling for attendance list
[confetti] / index.cgi
index 07edbf2bb25244cc15c1aac9f4e9b7653ae1c47c..1c4e7175ddf83f25dae4d7dc84ef7dd125734433 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -3,11 +3,14 @@
 for n in "$@"; do case ${n%%=*} in
   data) _DATA="${n#data=}";;
   exec) _EXEC="${n#exec=}";;
-  noerr) exec 2>&-;;
+  debug) DEBUG="${n#debug=}";;
 esac; done
 
-[ -z "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}"
-[ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"
+[ ! "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}"
+[ ! "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"
+[ "$DEBUG" ] && exec 2>>"$DEBUG"
+
+mkdir -p "${_DATA}/cache" "${_DATA}/mappings" "${_DATA}/export" "${_DATA}/lock" "${_DATA}/ical" "${_DATA}/vcard"
 
 debug() {
   local dbg=/dev/stderr
@@ -49,6 +52,7 @@ yield_page() {
        [html [head
           [title Confetti]
          [meta name="viewport" content="width=device-width"]
+         [link rel="stylesheet" type="text/css" href="/cgilite/common.css"]
          [link rel="stylesheet" type="text/css" href="/style.css"]
     '
     [ -n "$style" ] && printf '