File: update_html

package info (click to toggle)
libtecla 1.6.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,352 kB
  • sloc: ansic: 12,619; sh: 2,685; makefile: 127
file content (29 lines) | stat: -rwxr-xr-x 1,020 bytes parent folder | download | duplicates (6)
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
#!/bin/sh

# Convert man pages to html files.

for dir in man/prog man/libr man/func man/misc man/file; do
  for template in $dir/*.in;do
    page=`basename "$template" .in`
    if [ `wc -l < $template` -gt 1 ]; then
      html="html/$page.html"
      man2html -r $dir/$page | sed -s 's/\.\.\/man[0-9]*\///g' | sed -s 's/HREF="\.\.\//HREF="/g' | sed -s 's/\.[0-9][0-9]*\.html/.html/g' > $html
    fi
  done
done

# Convert the change log into a web page.

cd html
echo '<html><head><title>The tecla library change log</title></head>' > changes.html
echo '<body bgcolor="#add8e6"><pre>' >> changes.html
sed 's/&/&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' ../CHANGES >> changes.html
echo '</pre></body></html>' >> changes.html

# Do the same to the release-notes file.

cd ../html
echo '<html><head><title>The tecla library release notes</title></head>' > release.html
echo '<body bgcolor="#add8e6"><pre>' >> release.html
sed 's/&/&amp;/g; s/</\&lt;/g' ../RELEASE.NOTES >> release.html
echo '</pre></body></html>' >> release.html