From: Paul Hänsch Date: Sun, 14 Feb 2021 10:19:27 +0000 (+0100) Subject: clean up obsolete code X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=915db545f387cf9287b95f3ad5f84278bc2860d3;p=lobster clean up obsolete code --- diff --git a/index.cgi b/index.cgi index 40db42b..138ae74 100755 --- a/index.cgi +++ b/index.cgi @@ -12,28 +12,6 @@ esac; done mkdir -p "${_DATA}/cache" "${_DATA}/mappings" "${_DATA}/export" "${_DATA}/lock" "${_DATA}/ical" "${_DATA}/vcard" -debug() { - local dbg=/dev/stderr - if [ ! "$DEBUG" ]; then - [ "$#" -gt 0 ] && : || cat; - elif [ "$#" -gt 0 ]; then - printf '%s\n' "$@" >>"$dbg" - else - tee -a "$dbg" - 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" @@ -63,6 +41,7 @@ yield_page() { [html [head [title Lobster] [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 ' @@ -71,7 +50,6 @@ yield_page() { printf ' ] [body #top class="%s" ' "$class" - printf '[ul .menu [li [a "/cards/" . %s]][li [a "/courses/" . %s]]]' "$(l10n cards)" "$(l10n courses)" [ "$message" ] && printf '[p #message\n%s\n]' "$(l10n "$message")" cat printf '] ]' @@ -85,12 +63,6 @@ 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}" -# ;; *) if [ -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}/index.cgi" ]; then . "${_EXEC}/${_PATH}/index.cgi"