3
SCREENSHOTS=../../screenshots
9
convert $1 -crop 640x416+0+0 -resize 120x78 $2
16
if [ -d $SCREENSHOTS/$1 ]; then
17
for shot in $SCREENSHOTS/$1/*.png; do
18
base=`basename $shot .png`
20
update_if_newer $shot $png
24
echo "Error: no such directory '$1'"
29
if [ -d $SCREENSHOTS ]; then
30
for shot in $SCREENSHOTS/*.png; do
31
base=`basename $shot .png`
33
update_if_newer $shot $png
36
update_for_subdir Sokoban
37
update_for_subdir m_tutor
39
echo "Error: no such directory ($SCREENSHOTS)"
43
NEWPREVIEWS=`find . -name "*.png" -cmin -5`
44
COUNT=`echo $NEWPREVIEWS | wc -w`
46
if [ $COUNT = 0 ]; then
47
echo "All existing previews were up-to-date."
49
# if pngcrush is installed crush previews
50
if [ -x /usr/local/bin/pngcrush ] ; then
51
./04crushprevievs.sh $NEWPREVIEWS
52
elif which optipng ; then
56
echo "$COUNT preview(s) updated."