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
. "$_EXEC/cgilite/cgilite.sh"
. "$_EXEC/cgilite/session.sh"
+. "$_EXEC/l10n.sh"
+
_PATH="$(PATH "/${PATH_INFO}")"
ACTION="$(GET a)"
[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 '