File: update_html

package info (click to toggle)
xorp 1.8.5-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 28,560 kB
  • ctags: 54,995
  • sloc: cpp: 397,204; sh: 17,490; ansic: 17,029; python: 7,643; lex: 1,632; yacc: 1,474; awk: 956; makefile: 251; perl: 217; sed: 33
file content (35 lines) | stat: -rwxr-xr-x 988 bytes parent folder | download | duplicates (5)
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