Browse Source

Optimize script.

master
Niels G. W. Serup 5 years ago
parent
commit
6f76333567
  1. 9
      scripts/resize-thumbnails.sh

9
scripts/resize-thumbnails.sh

@ -8,10 +8,13 @@ cd "$(dirname "$0")"
cd ..
rm -rf thumbnails-small
mkdir thumbnails-small
mkdir -p thumbnails-small
cd thumbnails
for x in *; do
convert $x -resize x"$thumbnail_height" ../thumbnails-small/$x
large=$x
small=../thumbnails-small/$x
if [ $large -nt $small ]; then
convert $x -resize x"$thumbnail_height" $small
fi
done

Loading…
Cancel
Save