swerc

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

commit 63871d8127d7a6ad202092cd1b4bc23339a2c33a
parent 0e8edf93eb8acbe17eae6a9ab8a69b9437184da7
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Wed, 30 May 2007 12:10:23 +0200

Proper fix for the blog post sort issue
Diffstat:
Mbin/controller.rc | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/controller.rc b/bin/controller.rc @@ -109,7 +109,8 @@ fn genbody { if ( ~ $blog 'yes' && ~ $body */index.md ) { if ( ! ~ $#blogTitle 0 ) echo '<h1>'$"blogTitle'</h1>' - for ( i in `{ ls $blogDirs | grep '[0-9]+.*\.md$'| sort -r -t. +1 } ) { + # the /./ is added so we can sort -t. and order only the file name + for ( i in `{ ls $blogDirs^'/./' | grep '[0-9]+.*\.md$'| sort -r -t. +1 } ) { t=`{basename $i|sed -e 's/^[0-9\-]*_//' -e 's,\.md$,,' -e 's/_/ /g' } du=`{ls -l $i } #echo '<h2>' $"t '<small style="font-size: 70%">by '$"$du(4)' (Last mod: '$du(7) $du(8) $du(9)')</small></h2>'