diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-07 10:20:37 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-07 10:20:37 +0300 |
commit | 30cff0f11149ea2a85b025d143aa4a46369c87f0 (patch) | |
tree | 39179bdb40a12c297be70bf8a646d5ea2d69c274 /site/act/entry | |
parent | 8bb86acc75a348599c706c89715d71b2eae6bed0 (diff) | |
download | vsvs-30cff0f11149ea2a85b025d143aa4a46369c87f0.tar vsvs-30cff0f11149ea2a85b025d143aa4a46369c87f0.tar.xz vsvs-30cff0f11149ea2a85b025d143aa4a46369c87f0.zip |
.
Diffstat (limited to 'site/act/entry')
-rw-r--r-- | site/act/entry | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/site/act/entry b/site/act/entry deleted file mode 100644 index 33fd084..0000000 --- a/site/act/entry +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# This is the process to be called. -# $proc and $base (initial working directory) is already set. -# Requested path is in $1, any other request data is in proc/$proc/request. -# Usually you want to dispatch the path here and call some other programs. =) -# Path has ending / and no starting one (apth for root is empty). -# Response meta should be formed in proc/$proc/response, -# output is response body. -after () { test -z "${2##*$1*}" && echo -n "${2#*$1}"; } -startswith() { case $2 in "$1"*) true;; *) false;; esac; } -if test -z "$1" -then cat index.html -elif startswith "article/" "$1" -then ./act/article "$(after / $1)" -elif startswith "admin/" "$1" -then ./act/admin "$(after / $1)" -else cat 404.html -fi |