#! /bin/csh -f

set usage = "$0 UNITS..."

# Makes an index for the colorized files pages/${fnum}.html
# assuming they were buitl from the specified text units.

/bin/rm -f pages/index.html

set fnums = ( `echo $* | tr ' ' '\012' | sed -e 's/[.].*$//g'` )

cat page-index-header.html \
  > pages/index.html

echo "<ul>" >> pages/index.html
foreach fnum ( ${fnums} )
  echo '<li><a href="'"${fnum}.html"'">'"${fnum}"'</a>' >> pages/index.html
end
echo "</ul>" >> pages/index.html
cat page-trailer.html \
  >> pages/index.html