File: html-patch

package info (click to toggle)
hylafax 3%3A6.0.7-11.1
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 10,844 kB
  • sloc: sh: 15,305; ansic: 14,429; makefile: 1,562; cpp: 781; awk: 529
file content (25 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (11)
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
#!/bin/sh
ROOT=${1-/usr/share/doc/hylafax}
CGI=${2-/cgi-bin/man}
PATTERN="@[a-zA-Z][a-zA-Z]*@"

patch()
{
chmod a+w $1
ed - $1<<EOF
g;@CGIPATH@/manpage;s;;$CGI/man2html;g
g;@CGIPATH@;s;;$CGI;g
g;@HTMLPATH@;s;;$ROOT;g
w
q
EOF
chmod a-w $1
}

FILES=`grep -l "$PATTERN" *.html */*.html`
test "$FILES" && {
for i in $FILES
   do
       echo $i; patch $i;
   done
}