#!/bin/sh

temp=/tmp/tempFiles$$

echo Creating page for Small and Large Buttons...
rm  index.html >/dev/null 2>&1
cp ../htmlBeginning index.html
echo "<h3>Small Buttons (these files are in the bigButtons directory)</h3>" >>index.html
echo "<p>" >>index.html
for file in button*.gif
do
   if egrep "^$file\$" $temp >/dev/null 2>&1
   then
	:
   else
	echo "<p>" >>index.html
	echo "<IMG SRC=\"$file\" ALIGN=Middle" >>index.html
	echo "	ALT=\"\"> <a href=\"$file\">bigButtons/$file</a>" >>index.html
	echo $file >>$temp
   fi
done
echo "<h3>Big Buttons</h3>" >>index.html
echo "<p>" >>index.html
for file in *BigButton.gif
do
   if egrep "^$file\$" $temp >/dev/null 2>&1
   then
	:
   else
	echo "<p>" >>index.html
	echo "<IMG SRC=\"$file\" ALIGN=Middle" >>index.html
	echo "	ALT=\"\"> <a href=\"$file\">bigButtons/$file</a>" >>index.html
	echo $file >>$temp
   fi
done

cat ../htmlEnding >>index.html
chmod 666 index.html

rm $temp
echo Done.
