~ubuntu-branches/ubuntu/breezy/postfix/breezy-security

« back to all changes in this revision

Viewing changes to mantools/readme2html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-09-01 22:20:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050901222012-yrevif1ju56oy2d8
Tags: 2.2.4-1ubuntu2
mailer type is only a high-pri question if this is a fresh install.
Closes: #14130

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Crude script to convert plain READMEs to HTML
 
4
 
 
5
echo '<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
 
6
        "http://www.w3.org/TR/html4/loose.dtd">
 
7
 
 
8
<html>
 
9
 
 
10
<head>
 
11
 
 
12
<title>Title Here</title>
 
13
 
 
14
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
 
15
 
 
16
</head>
 
17
 
 
18
<body>
 
19
 
 
20
<h1>Title Here</h1>'
 
21
 
 
22
sed '
 
23
        s/&/\&amp;/g
 
24
        s/</\&lt;/g
 
25
        s/>/\&gt;/g
 
26
' "$@" | awk '
 
27
/^====+$/ { print "<h2>" line "</h2>"; line = ""; getline; next }
 
28
NF == 0   { print line; print $0; print "<p>"; line = $0; next }
 
29
          { print line; line = $0 }
 
30
END       { print line }
 
31
'
 
32
 
 
33
echo '
 
34
</body>
 
35
 
 
36
</html>'