Introduction
Introduction Statistics Contact Development Disclaimer Help
Handle dir listing of site root. - swerc - anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log
Files
Refs
README
---
commit 0de2e2ea45dbd28f0155554c0bb4488bb9f431d7
parent 8010a7933060dd5c46255ce599288cab16dbbe87
Author: [email protected] <unknown>
Date: Mon, 26 Jan 2009 04:51:06 +0100
Handle dir listing of site root.
Diffstat:
M bin/werc.rc | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/bin/werc.rc b/bin/werc.rc
@@ -69,6 +69,8 @@ fn txt_handler {
fn dir_listing_handler {
d=`{basename -d $1}
+ if(~ $#d 0)
+ d='/'
echo $d|sed 's,.*//,,g; s,/$,,; s,/, / ,g; s,.*,<h1 class="dir-list-head">…
# Symlinks suck: '/.' forces ls to list the linked dir if $d is a symlink.
ls -F $dir_listing_ls_opts $sitedir$d/. | sed $dirfilter$dirclean' s,.*/([…
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.