shithub: werc

Download patch

ref: 089924a4e7f48ffa1cd79c3d66e829f426266d3e
parent: 13874b2e83bf247a0a9677bb78d48266fecb1752
author: uriel <[email protected]>
date: Sat May 31 02:22:58 EDT 2008

Reverse menu listing of blog items.

--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -30,7 +30,11 @@
 
 # Sidebar 
 fn menu {
-    ls -F $1 | sed $dirfilter | awk -F/ '
+    lsArgs = ( '-F' )
+    if (! ~ $#blogDirs 0) {
+    	lsArgs = ($lsArgs -r)
+    }
+    ls $lsArgs $1 | sed $dirfilter | awk -F/ '
     BEGIN { print "<ul class=\"sidebar\">" }
     END { print "</ul>" }
     /^([a-zA-Z0-9+_\-]+[\/*]?)+$/ && $NF != "index" {