#!/bin/sh
# file: fixindex	G. Moody	6 October 1996
#
# Remove (most) duplicate entries from an HTML index generated by latex2html.

if [ $# -eq 0 ]
then echo usage: $0 html-directory; exit 1
fi

cd $1
A=`grep -l "<TITLE>Index" node*.html`
if [ -e $A.orig ]
then echo Index has already been compacted.
else mv $A $A.orig; uniq <$A.orig >$A; echo Index $A has been compacted.
fi

exit 0
