changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > werc / changeset: Handle dir listing of site root.

changeset 369: b1112b957e36
parent 368: 48fe4da79385
child 370: bba0f2fda217
author: uriel@engel.se.cat-v.org
date: Mon, 26 Jan 2009 04:51:06 +0100
files: bin/werc.rc
description: Handle dir listing of site root.
     1.1--- a/bin/werc.rc	Mon Jan 26 04:10:02 2009 +0100
     1.2+++ b/bin/werc.rc	Mon Jan 26 04:51:06 2009 +0100
     1.3@@ -69,6 +69,8 @@
     1.4 
     1.5 fn dir_listing_handler {
     1.6     d=`{basename -d $1}
     1.7+    if(~ $#d 0)
     1.8+        d='/'
     1.9     echo $d|sed 's,.*//,,g; s,/$,,; s,/, / ,g; s,.*,<h1 class="dir-list-head">&</h1> <ul class="dir-list">,'
    1.10     # Symlinks suck: '/.' forces ls to list the linked dir if $d is a symlink.
    1.11     ls -F $dir_listing_ls_opts $sitedir$d/. | sed $dirfilter$dirclean' s,.*/([^/]+/?)$,<li><a href="\1">\1</a></li>,'