summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsxv478 <atci39@rambler.ru>2023-06-30 23:55:27 +0300
committertsxv478 <atci39@rambler.ru>2023-06-30 23:55:27 +0300
commit2b4573777bc54823e0b59faef3f41fcd3efa0958 (patch)
treeef286b5474d2030fac9ff576e32e0dd6d296e06b
parent118f1029155f01623c0ca7c18d9359025b25fd12 (diff)
process files in reverse order
-rwxr-xr-xgalgen2
1 files changed, 1 insertions, 1 deletions
diff --git a/galgen b/galgen
index 4ca4892..2fcbf06 100755
--- a/galgen
+++ b/galgen
@@ -129,7 +129,7 @@ MY_ROWS='3'
echo '<div class="row row-cols-3 no-gutters py-3">' >> "$MY_INDEX_HTML_FILE"
## Generate Images
MY_NUM_FILES=0
-for MY_FILENAME in *.[jJ][pP][gG]; do
+for MY_FILENAME in $(ls -r *.[jJ][pP][gG]); do
MY_FILELIST[$MY_NUM_FILES]=$MY_FILENAME
(( MY_NUM_FILES++ ))
$MY_CONVERT_COMMAND -auto-orient -strip -quality $MY_QUALITY -resize "$MY_HEIGHT_SMALL^>" -gravity center -crop "$MY_HEIGHT_SMALL"x"$MY_HEIGHT_SMALL"+0+0 "$MY_FILENAME" "$MY_THUMBDIR/$MY_HEIGHT_SMALL/$MY_FILENAME"