#!/usr/bin/env bash
echo "
1600x1200 640x480
" > index.html
echo "1600x1200 640x480
" > small.html
mkdir orig thumb 1600x1200 640x480
for a in *JPG
do
echo $a
LC=`echo $a | tr '[A-Z]' '[a-z]'`
chmod 644 "$a"
mv "$a" "orig/$a"
convert "orig/$a" "1600x1200/$LC"
convert -resize 640x480 "orig/$a" "640x480/$LC"
convert -resize 160x120 "orig/$a" "thumb/$LC"
echo "
" >> index.html
echo "
" >> small.html
done
echo "
.." >> index.html
echo "
.." >> small.html