Sort ZIPs by size descending before processing
This commit is contained in:
@@ -10,8 +10,9 @@ fi
|
||||
|
||||
echo "Resizing images in ZIPs recursively in $SEARCH_DIR"
|
||||
|
||||
find "$SEARCH_DIR" -iname '*.zip' -print0 | while IFS= read -r -d '' f
|
||||
do
|
||||
"$SCRIPT_DIR/zip_images_resize.sh" "$f"
|
||||
done
|
||||
find "$SEARCH_DIR" -iname '*.zip' -printf '%s\t%p\0' | \
|
||||
sort -z -t$'\t' -k1,1rn | \
|
||||
while IFS=$'\t' read -r -d '' _size f; do
|
||||
"$SCRIPT_DIR/zip_images_resize.sh" "$f"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user