From d7edcd7bd9253c60c8f48f8bc716d7d9f9613a2f Mon Sep 17 00:00:00 2001 From: Uriel Date: Fri, 2 Jan 2009 16:49:44 +0100 Subject: [PATCH] Minnor change, merge two lines and add a comment from the old blog code. --- apps/blagh/app.rc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc index cc77db7..5fe8eaa 100644 --- a/apps/blagh/app.rc +++ b/apps/blagh/app.rc @@ -38,6 +38,7 @@ fn blagh_body { } fn get_post_list { - d=$*^/./[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/ - ls -F $d >[2]/dev/null | sed -n 's,/\./,/|/,; /\/$/p' | sort -r '-t|' +1 | sed 's,/+\|/+,/,' + # the /./->/|/ are added so we can sort -t| and order only the file name + # NOTE: this breaks if any path element in blogDirs contain '/./' or '|' + ls -F $*^/./[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/ >[2]/dev/null | sed -n 's,/\./,/|/,; /\/$/p' | sort -r '-t|' +1 | sed 's,/+\|/+,/,' }