# Generate the index and TOC files from the DIRECTORY files
files=`find $SRC -name "DIRECTORY"`
- index=`find $SRC -name "LIBINDEX"`
- curdate=`date`
- sed -e "/@DATE@/s//$curdate/" $index >$DST/index.html
+ touch $DST/index.html.tmp
for i in $files
do
# Get library name
sh gen.sh index.php $DST/$fname $DST/$fname
# Generate the link for the top index.html for this library
- echo "<LI><A HREF="$fname">$name</A>" >>$DST/index.html
+ echo "<LI><A HREF="$fname">$name</A>" >>$DST/index.html.tmp
done
# Generate the top index.html file
+ index=`find $SRC -name "LIBINDEX"`
+ curdate=`date`
+ sed -e "/@DATE@/s//$curdate/" -e "/@BODY@/ r $DST/index.html.tmp" -e s/@BODY@//g $index >$DST/index.html
sh gen.sh gen_toc.php $DST/index.html $DST/index.html
sh gen.sh index.php $DST/index.html $DST/index.html
+ rm -rf $DST/index.html.tmp
rm -rf /tmp/silcdoc.html
fi