-
Notifications
You must be signed in to change notification settings - Fork 10
/
po4a_issue295.sh
executable file
·39 lines (36 loc) · 1.06 KB
/
po4a_issue295.sh
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
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# Fixup for https://github.com/mquinson/po4a/issues/295
sed_cmd='
1h
1!{
/<screen[^\n]*><!--.*-->\n/!H
g
/<screen[^\n]*><!--.*-->\n/{
s/\(<screen[^\n]*>\)\(\(<!--.*-->\)\+\n\)\+/\1/
p
n
h
}
}
$p
'
sed -n "${sed_cmd}" -i \
chapter06/ncurses.xml \
chapter07/kernfs.xml \
chapter08/glibc.xml \
chapter08/flex.xml \
chapter08/autoconf.xml \
chapter08/gettext.xml \
chapter08/ninja.xml \
chapter08/texinfo.xml \
chapter08/systemd.xml \
chapter08/shadow.xml \
chapter08/stripping.xml \
chapter09/networkd.xml \
chapter09/network.xml \
chapter09/consoled.xml \
chapter09/usage.xml
# Looks stupid, but I don't know any better way.
for iter in 1 2 3; do
sed -n "${sed_cmd}" -i chapter08/glibc.xml chapter08/stripping.xml
done