From 4638945a268e4677c95ec44daccdff6631143993 Mon Sep 17 00:00:00 2001 From: Nils Date: Sat, 24 Nov 2018 17:34:28 +0100 Subject: case-insensitive --- gallery.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gallery.sh') diff --git a/gallery.sh b/gallery.sh index 437207c..566b33a 100755 --- a/gallery.sh +++ b/gallery.sh @@ -124,7 +124,7 @@ cat > "$htmlfile" << EOF EOF ### Photos (JPG) -if [[ $(find . -maxdepth 1 -type f -name \*.jpg | wc -l) -gt 0 ]]; then +if [[ $(find . -maxdepth 1 -type f -iname \*.jpg | wc -l) -gt 0 ]]; then echo '
' >> "$htmlfile" ## Generate Images @@ -225,7 +225,7 @@ done fi ### Movies (MOV or MP4) -if [[ $(find . -maxdepth 1 -type f -name \*.mov -o -name '*.mp4' | wc -l) -gt 0 ]]; then +if [[ $(find . -maxdepth 1 -type f -iname \*.mov -o -iname '*.mp4' | wc -l) -gt 0 ]]; then cat >> "$htmlfile" << EOF
@@ -235,7 +235,7 @@ if [[ $(find . -maxdepth 1 -type f -name \*.mov -o -name '*.mp4' | wc -l) -gt 0
EOF - if [[ $(find . -maxdepth 1 -type f -name \*.mov | wc -l) -gt 0 ]]; then + if [[ $(find . -maxdepth 1 -type f -iname \*.mov | wc -l) -gt 0 ]]; then for filename in *.[mM][oO][vV]; do filesize=$(getFileSize "$filename") cat >> "$htmlfile" << EOF @@ -243,7 +243,7 @@ EOF EOF done fi - if [[ $(find . -maxdepth 1 -type f -name \*.mp4 | wc -l) -gt 0 ]]; then + if [[ $(find . -maxdepth 1 -type f -iname \*.mp4 | wc -l) -gt 0 ]]; then for filename in *.[mM][pP]4; do filesize=$(getFileSize "$filename") cat >> "$htmlfile" << EOF @@ -255,7 +255,7 @@ EOF fi ### Downloads (ZIP) -if [[ $(find . -maxdepth 1 -type f -name \*.zip | wc -l) -gt 0 ]]; then +if [[ $(find . -maxdepth 1 -type f -iname \*.zip | wc -l) -gt 0 ]]; then cat >> "$htmlfile" << EOF
-- cgit v1.2.3