From 9c7c48c14c28e560989bef592710635e0a44cde0 Mon Sep 17 00:00:00 2001 From: Uriel Date: Wed, 30 May 2007 12:10:23 +0200 Subject: [PATCH] Proper fix for the blog post sort issue --- bin/controller.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/controller.rc b/bin/controller.rc index 34861ec..05e206f 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -109,7 +109,8 @@ fn genbody { if ( ~ $blog 'yes' && ~ $body */index.md ) { if ( ! ~ $#blogTitle 0 ) echo '

'$"blogTitle'

' - 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 '

' $"t 'by '$"$du(4)' (Last mod: '$du(7) $du(8) $du(9)')

'