From: paul Date: Tue, 16 May 2017 09:49:20 +0000 (+0000) Subject: ignore case when sorting, i.e. sort lower and upper case names together X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=7ec58bd054af6d434370d7b95abcef1ebd8d0727;p=serve0 ignore case when sorting, i.e. sort lower and upper case names together svn path=/trunk/; revision=184 --- diff --git a/pages/browse.sh b/pages/browse.sh index eba470b..be487ca 100755 --- a/pages/browse.sh +++ b/pages/browse.sh @@ -128,17 +128,17 @@ filelist(){ case "$order" in Name) find -L "$dir" -mindepth 1 -maxdepth 1 -type d \! -name ".index" -print0 \ - | sort -z \ + | sort -fz \ | xargs -0 printf 'directory %s\n' find -L "$dir" -mindepth 1 -maxdepth 1 \! -type d -print0 \ | grep -ziE "$file_pattern" \ - | sort -z \ + | sort -fz \ | xargs -0 printf 'video %s\n' find -L "$dir" -mindepth 1 -maxdepth 1 \! -type d -print0 \ | grep -zviE "$file_pattern" \ - | sort -z \ + | sort -fz \ | xargs -0 printf 'plain %s\n' ;; Date) diff --git a/pages/list.sh b/pages/list.sh index 757d541..7dbe2d0 100755 --- a/pages/list.sh +++ b/pages/list.sh @@ -99,7 +99,7 @@ genlist(){ case "$order" in Date) find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%T@ %f\n' |sort -r |cut -d\ -f2- |egrep -i "$file_pattern";; Length) sed -sn 1p "${_DATA}"/meta/*.meta |sort -n |sed -r 's;^[0-9\t]+\t;;';; - Name) find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%f\n' |sort |egrep -i "$file_pattern";; + Name) find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%f\n' |sort -f |egrep -i "$file_pattern";; esac }