#!/bin/sh

num=0

while [ $num -lt 50 ]; do

	echo rendering ball $num

	sed -e "s/lotto-number/$num/" < ball.eps > shit.ps
	echo "(shit.ps) run showpage" | \
		gs -sDEVICE=ppm -sOutputFile=ball.ppm -g80x80 -r72

	ppmtogif -transparent \#00ff00 < ball.ppm > ball$num.gif

	num=`expr $num + 1`
done

rm shit.ps ball.ppm

#
#
#

echo "0 20 translate (blotto.eps) run showpage" | \
	gs -sDEVICE=ppm -sOutputFile=blotto.ppm -g100x120 -r72
ppmtogif -transparent "#ffffff" < blotto.ppm > blotto.gif

rm blotto.ppm
