#!/bin/sh
# pics_index.sh
target=pics_index.html
echo "<!-- DO NOT EDIT $target Built from pics_index.sh -->" > $target
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' >> $target


echo '<HTML>'						>> $target
echo -n '<HEAD><link rel="shortcut icon"'		>> $target
echo 'href="http://www.berklix.net/gifs/berklix.ico">'	>> $target
echo -n '<META name="generator"'			>> $target
echo 'content= "HTML http://www.berklix.com/~jhs/bin/.sh/pics_index.sh">' >> $target
echo '<TITLE>Index of JPEGs</TITLE>'			>> $target
echo '</HEAD>'						>> $target
echo "<BODY>"						>> $target
echo "<H1>Index of .jpg in `pwd`<br> `date`</H1>"	>> $target
echo -n '<H3>Built by '					>> $target
echo -n '<a href="http://www.berklix.com/~jhs/bin/.sh/pics_index.sh">' \
							>> $target
echo 'http://www.berklix.com/~jhs/bin/.sh/pics_index.sh</A></H3>' \
							>> $target
echo "<H2>Files</H2>"					>> $target
echo "<HR>"						>> $target
echo "<UL>"						>> $target
for i in `find . -type f -name \*.jpg | sed -e s/..// | sort` ; do
	echo "<LI>`ls -1 $i`</LI>"			>> $target
	done
echo "</UL>"						>> $target
echo "<HR>"						>> $target
echo "<H2>Pictures</H2>"				>> $target
echo "<UL>"						>> $target
for i in `find . -type f -name \*.jpg | sed -e s/..// | sort` ; do
	echo "<LI>$i<br><img alt=dummy src=$i></LI>"	>> $target
	done
echo "</UL>"						>> $target
echo "</BODY>"						>> $target
