File: html-patch

package info (click to toggle)
hylafax 1%3A4.1.1-3.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,400 kB
  • ctags: 7,270
  • sloc: sh: 15,895; ansic: 12,661; makefile: 1,439; cpp: 850
file content (24 lines) | stat: -rw-r--r-- 325 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
ROOT=${1-/usr/doc/hylafax}
CGI=${2-/cgi-bin}
PATTERN="@[a-zA-Z][a-zA-Z]*@"

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

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