swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit b14be5c8364ea865973682925ff1904757cd47d2
parent 3bdbe1390435b133a13eb9a45c1f239b65aeed95
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Tue, 14 Oct 2008 06:59:19 +0200

Make rc happy and comment work in progress code
Diffstat:
Mbin/cgilib.rc | 50+++++++++++++++++++++++++-------------------------
Mbin/controller.rc | 4+---
2 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/bin/cgilib.rc b/bin/cgilib.rc @@ -116,7 +116,7 @@ fn make_blog_post { for(f in $bdir/$date-*) { i = `{echo $f | sed -n 's|^.*/'$date'-([0-9]+)_.*|\1|p'} if(! ~ $#i 0 && test $i -ge $n) - n = `{hoc -e $i'+1'} + n = `{hoc -e $i'+1'} } title = `{echo $"title | sed 's/[ ]+/_/g; 1q'} @@ -126,27 +126,27 @@ fn make_blog_post { # -------- - -app_blog_methods = ( _post index.rss ) -fn app_blog__post { - -} - -app_blog___default { - if (~ $blog - call_app blogpost -} - -# -- -app_blogpost_methods = ( comment _edit ) - -fn app_blogpost_comment { - call_app comments -}_ - -# -- -app_comments_methods = ( _post _edit ) - -fn app_comments___default { - -} +# +#app_blog_methods = ( _post index.rss ) +#fn app_blog__post { +# echo +#} +# +#app_blog___default { +# if (~ $blog) +# call_app blogpost +#} +# +## -- +#app_blogpost_methods = ( comment _edit ) +# +#fn app_blogpost_comment { +# call_app comments +#} +# +## -- +#app_comments_methods = ( _post _edit ) +# +#fn app_comments___default { +# +#} diff --git a/bin/controller.rc b/bin/controller.rc @@ -251,9 +251,7 @@ if(test -f etc/initrc.local) # Parse request URL uri = `{echo -n $REQUEST_URI | sed -e 's/\?.*//; s/'^$forbidden_uri_chars^'//g; s/\.\.*/./g;' -e '1q'} -ifs='/' { - args = `{echo -n $uri} -} +ifs='/' { args = `{echo -n $uri} } if(! ~ $#debug 0)