3 for n in "$@"; do case ${n%%=*} in
4 data) _DATA="${n#data=}";;
5 exec) _exec="${n#exec=}";;
9 [ -z "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}"
10 [ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"
12 . "$_EXEC/cgilite/cgilite.sh"
13 . "$_EXEC/cgilite/session.sh"
15 _PATH="$(PATH "/${PATH_INFO}")"
19 local class="$1" style="$2"
20 printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
23 [meta name="viewport" content="width=device-width"]
24 [link rel="stylesheet" type="text/css" href="/style.css"]
26 [ -n "$style" ] && printf '
27 [link rel="stylesheet" type="text/css" href="%s"]
35 | "${_EXEC}/cgilite/html-sh.sed"
38 if [ -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}/main.cgi" ]; then
39 . "${_EXEC}/${_PATH}/main.cgi"
40 elif [ ! -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}" ]; then
42 elif [ ! -x "${_EXEC}/${_PATH}" -a -r "${_EXEC}/${_PATH}" ]; then
43 . "$_EXEC/cgilite/file.sh"
44 FILE "${_EXEC}/${_PATH}"
46 printf 'Status: 404 Not Found\r\nContent-Length: 0\r\n\r\n'