#!/bin/sh

temp=/tmp/tempFiles$$

echo Creating page for Lines and Bars...
rm  index.html >/dev/null 2>&1
cp ../htmlBeginning index.html
echo "<h3>Lines and Bars (these files are in the bars subdirectory)</h3>" >>index.html
echo "<p>" >>index.html
for file in *.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\">bars/$file</a>" >>index.html
	echo $file >>$temp
   fi
done

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

rm $temp
echo Done.
