dot

packages and services management
Log | Files | Refs | README

commit 5f1360cbae5d35b77efde5c2d4d0b492ddd9e5fe
parent e8088c987fdbb53999b13025f0eecca4ad01f946
Author: josuah <mail@josuah.net>
Date:   Thu,  8 Sep 2016 02:19:46 +0200

www: Fixed list sorting

Diffstat:
Mbin/www | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/www b/bin/www @@ -64,7 +64,9 @@ parse() list() { - find "$1" -mindepth 1 -maxdepth 1 ! -name 'README' | while read -r path + find "$1" -mindepth 1 -maxdepth 1 ! -name 'README' \ + | sort \ + | while read -r path do printf '<a href="%s">%s</a>\n' "${path#$1/}" "${path#$1/}" done } @@ -76,7 +78,7 @@ fi # Generate navigation IFS="$NL" nav='<a href="..">&lt;&lt;&lt;</a>' -for dir in $(find . -mindepth 1 -maxdepth 1 -type d ! -path '*/.*') +for dir in $(find . -mindepth 1 -maxdepth 1 -type d ! -path '*/.*' | sort) do nav="$nav$NL<a href=\"{{ root }}/${dir#./}\">${dir#./}</a> |" done unset IFS