Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / mantools / readme2html
blob64b51114e25ef88ff4c5e1ffccfc20953fbe28f3
1 #!/bin/sh
3 # Crude script to convert plain READMEs to HTML
5 echo '<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
6 "http://www.w3.org/TR/html4/loose.dtd">
8 <html>
10 <head>
12 <title>Title Here</title>
14 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
16 </head>
18 <body>
20 <h1>Title Here</h1>'
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 }
33 echo '
34 </body>
36 </html>'