TDS / Unix CD work

Thomas Esser te@informatik.uni-hannover.de
Tue, 20 Feb 1996 17:07:47 +0100


> What is MakeHTML?

makehtml is a small shellscript I wrote to access the .dvi and .ps files
in texmf/doc.  I think it is only useful for a depth of two or three.

	Thomas

PS: Here we go:

#!/bin/sh

echo '<TITLE>The TeX System</TITLE>'
echo '<H1>The TeX System</H1>'

for i in *; do
        if [ $i = help ]; then
                echo "<h2>$i</h2>"
                echo '<ul>'
                for j in $i/*; do
                        echo "<li><a href=$j>`basename $j`</a>"
                done
                echo '</ul>'
                continue
        fi
        if [ -d $i ]; then
                echo "<h2>$i</h2>"
                echo '<ul>'
                for j in $i/*.dvi $i/*.ps $i/*.tex; do
                        test -f $j && echo "<li><a href=$j>`basename $j`</a>"
                done
                for j in $i/*; do
                        test -d $j || continue
                        test -f `echo $j/*.dvi | sed 's/ .*//'` ||
                        test -f `echo $j/*.ps | sed 's/ .*//'` || continue
                        echo '<li>'`basename $j`
                        echo '<ul>'
                        for k in $j/*.dvi $j/*.ps $j/*.tex ; do
                                test -f $k || continue
                                echo "<li><a href=$k>`basename $k`</a>"
                        done
                        echo '</ul>'
                done
                echo '</ul>'
        fi
done