From 7ec58bd054af6d434370d7b95abcef1ebd8d0727 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 16 May 2017 09:49:20 +0000 Subject: [PATCH] ignore case when sorting, i.e. sort lower and upper case names together svn path=/trunk/; revision=184 --- pages/browse.sh | 6 +++--- pages/list.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 } -- 2.39.2