summaryrefslogtreecommitdiffstats
path: root/libtecla-1.4.1/update_html
blob: 35625a7bd4760af897814368bdad850db4e59af7 (plain) (blame)
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
#!/bin/sh

# Convert man pages to html files.

cd man3
for page in *.3;do
  if [ "`wc -l $page | awk '{print $1}'`" -gt 1 ]; then
    html="../html/`echo $page | sed -e 's/.3$/.html/'`"
    man2html $page > $html
    for ref in "libtecla(3)" "cpl_complete_word(3)" "ef_expand_file(3)" "gl_get_line(3)" "pca_lookup_file(3)" "enhance(3)"; do
      link="`echo $ref | sed 's/(3)/.html/'`"
      ed -s $html << EOF
	1,\$s|$ref|<a href="$link">&</a>|g
	w
	q
EOF
    done
  fi
done

# Convert the change log into a web page.

cd ../html
echo '<HEAD><TITLE>The tecla library change log</TITLE></HEAD>' > changes.html
echo '<BODY bgcolor=add8e6><PRE>' >> changes.html
cat ../CHANGES >> changes.html
echo '</PRE></BODY>' >> changes.html

# Do the same to the release-notes file.

cd ../html
echo '<HEAD><TITLE>The tecla library release notes</TITLE></HEAD>' > release.html
echo '<BODY bgcolor=add8e6><PRE>' >> release.html
cat ../RELEASE.NOTES >> release.html
echo '</PRE></BODY>' >> release.html