# HG changeset patch # User Christophe Lincoln # Date 1390144601 -3600 # Node ID 5aa9e5f4125f5f84196530b354693a53cd74a825 # Parent c4a472d0a45e6cbf609adaaf20e04f31679b6e8e blog: sort post correctly (ls is buggy with numbers) diff -r c4a472d0a45e -r 5aa9e5f4125f plugins/blog/blog.cgi --- a/plugins/blog/blog.cgi Sun Jan 19 15:53:39 2014 +0100 +++ b/plugins/blog/blog.cgi Sun Jan 19 16:16:41 2014 +0100 @@ -56,7 +56,7 @@ # Display blog post: show_posts count show_posts() { - for p in $(ls -r $blog | head -n $1) + for p in $(ls $blog | sort -r -n | head -n $1) do show_post ${p} done