#!/bin/ksh

for d in audio-gear computer-parts electronics lab-equipment manuals misc photography sf-books text-books; do
    ( cd $d &&
	  ( echo
	    ls -1 *.jpg | while read g; do
		i=${g%%-*}
		f=${i}.html
		if grep -q $f index.html; then
		    continue
		fi
		print "<tr><td>"
		print "    <div><a href=\"$f\">${i}.  .</a></div>"
		print "    <img src=\"$g\" height=64 width=64>"
		print "    </td></tr>"
	    done
	  ) >> index.html
    )
done
