Optimize script.

This commit is contained in:
Niels G. W. Serup 2016-08-25 02:36:24 +02:00
parent 9efcc292bc
commit 6f76333567
1 changed files with 6 additions and 3 deletions

View File

@ -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