File: mkhtml

package info (click to toggle)
tetex-base 3.0.dfsg.3-5etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 239,592 kB
  • ctags: 10,610
  • sloc: xml: 103,461; perl: 9,398; ruby: 2,850; python: 1,551; php: 1,067; sh: 981; lisp: 494; makefile: 371; awk: 88
file content (60 lines) | stat: -rwxr-xr-x 1,669 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh

: ${MAKE=make}

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

for i in *; do
	if [ $i = help ]; then
		echo "<h2>$i</h2><P>"
		echo '<ul>'
		for j in help/*; do
			if [ -f $j/index.html ]; then
				echo "<li><a href=\"$j/index.html\">`basename $j`</a>"
			else
				echo "<li><a href=\"$j\">`basename $j`</a>"
			fi
		done
		echo '</ul>'
		continue
	fi
	if [ -d $i ]; then
		echo "<h2>$i</h2><P>"
		echo '<ul>'
		for j in $i/*.html $i/*.html.gz $i/*.dvi $i/*.ps $i/*.tex $i/*.dvi.gz $i/*.ps.gz $i/*.tex.gz $i/*.pdf; 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/*.html | sed 's/ .*//'` ||
			test -f `echo $j/*.html.gz | sed 's/ .*//'` ||
			test -f `echo $j/*.ps.gz | sed 's/ .*//'` ||
			test -f `echo $j/*.dvi.gz | sed 's/ .*//'` ||
			test -f `echo $j/*.dvi | sed 's/ .*//'` ||
			test -f `echo $j/*.pdf | sed 's/ .*//'` ||
			test -f `echo $j/*.ps | sed 's/ .*//'` || continue
			if test -f $j/index.html; then
			  echo "<li><a href=\"$j/index.html\">`basename $j`</a>"
			else
			  echo '<li>'`basename $j`
			  echo '<ul>'
			  for k in $j/xyguide-html $j/index.html $j/index.html.gz $j/*.dvi $j/*.ps $j/*.tex $j/*.dvi.gz $j/*.ps.gz $j/*.tex.gz $j/*.pdf $j/Seminar-Bugs.html $j/Seminar-FAQ.html; do
				if test -f $k/index.html; then
				echo "<li><a href=\"$k/index.html\">`basename $k`</a>"
				else
					test -f $k || continue
					echo "<li><a href=\"$k\">`basename $k`</a>"
				fi
			  done
			  echo '</ul>'
			fi
		done
		echo '</ul>'
	fi
done

# test -w help/Catalogue/ctfull.html \
#   && (cd help/Catalogue; $MAKE) >&2

exit 0