2014-01-30 20:51:04 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-02-03 20:09:17 +00:00
|
|
|
HALF_RES_RESOLUTIONS="240 320 360 480 540 600 720 768 800 1080 1200 1440 1536 1600"
|
2014-01-30 20:51:04 +00:00
|
|
|
|
|
|
|
for i in $HALF_RES_RESOLUTIONS; do
|
2015-01-22 03:48:05 +00:00
|
|
|
rm -f $i.zip
|
2014-01-30 20:51:04 +00:00
|
|
|
mkdir $i
|
|
|
|
cd $i
|
|
|
|
if [ -f ../../$(($i/2)).zip ]; then
|
|
|
|
# use the existing scaled images
|
|
|
|
echo "Using existing half-scale images instead of scaling from $i px"
|
|
|
|
unzip ../../$(($i/2)).zip
|
|
|
|
rm -f desc.txt
|
|
|
|
unzip ../../$i.zip desc.txt
|
|
|
|
else
|
|
|
|
unzip ../../$i.zip
|
|
|
|
for j in */*.jpg; do
|
|
|
|
convert $j -resize 50% tmp.jpg
|
|
|
|
mv tmp.jpg $j
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
zip -r0 ../$i.zip .
|
|
|
|
cd ..
|
|
|
|
rm -rf $i
|
|
|
|
done
|