|
@@ -68,31 +68,39 @@ sed "/releasedate/s/\".*\"/\"${reldate_cn}\"/" -i general.ent
|
|
|
|
|
|
# Some buggy comments produced by po4a are adding extra empty lines.
|
|
# Some buggy comments produced by po4a are adding extra empty lines.
|
|
# Remove them.
|
|
# Remove them.
|
|
-sed -n '
|
|
|
|
|
|
+sed_cmd='
|
|
1h
|
|
1h
|
|
1!{
|
|
1!{
|
|
/<screen[^\n]*><!--.*-->\n/!H
|
|
/<screen[^\n]*><!--.*-->\n/!H
|
|
g
|
|
g
|
|
/<screen[^\n]*><!--.*-->\n/{
|
|
/<screen[^\n]*><!--.*-->\n/{
|
|
- s/\(<screen[^\n]*>\)<!--.*-->\n/\1/
|
|
|
|
|
|
+ s/\(<screen[^\n]*>\)\(\(<!--.*-->\)\+\n\)\+/\1/
|
|
p
|
|
p
|
|
n
|
|
n
|
|
h
|
|
h
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$p
|
|
$p
|
|
-' -i \
|
|
|
|
|
|
+'
|
|
|
|
+
|
|
|
|
+sed -n "${sed_cmd}" -i \
|
|
chapter06/ncurses.xml \
|
|
chapter06/ncurses.xml \
|
|
chapter08/glibc.xml \
|
|
chapter08/glibc.xml \
|
|
chapter08/flex.xml \
|
|
chapter08/flex.xml \
|
|
chapter08/ninja.xml \
|
|
chapter08/ninja.xml \
|
|
chapter08/texinfo.xml \
|
|
chapter08/texinfo.xml \
|
|
chapter08/systemd.xml \
|
|
chapter08/systemd.xml \
|
|
|
|
+ chapter08/strippingagain.xml \
|
|
chapter09/networkd.xml \
|
|
chapter09/networkd.xml \
|
|
chapter09/network.xml \
|
|
chapter09/network.xml \
|
|
chapter09/consoled.xml \
|
|
chapter09/consoled.xml \
|
|
chapter09/usage.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/strippingagain.xml
|
|
|
|
+done
|
|
|
|
+
|
|
# Apply lfs-l10n.xml patch, if it's not applied
|
|
# Apply lfs-l10n.xml patch, if it's not applied
|
|
grep "Simplified Chinese" stylesheets/lfs-xsl/lfs-l10n.xml ||
|
|
grep "Simplified Chinese" stylesheets/lfs-xsl/lfs-l10n.xml ||
|
|
patch -N -p1 -i ../patches/lfs-l10n.xml.patch
|
|
patch -N -p1 -i ../patches/lfs-l10n.xml.patch
|