summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-11-30 22:30:29 (GMT)
committerFred Drake <fdrake@acm.org>1998-11-30 22:30:29 (GMT)
commit3d5e2c032d2df174b77d53dc26ef22ae3108f084 (patch)
tree99628d3602f46e349188530888dc42f0504138e0 /Doc
parent50b804dc8845138d8d2eab66b81943a62165d058 (diff)
downloadcpython-3d5e2c032d2df174b77d53dc26ef22ae3108f084.zip
cpython-3d5e2c032d2df174b77d53dc26ef22ae3108f084.tar.gz
cpython-3d5e2c032d2df174b77d53dc26ef22ae3108f084.tar.bz2
Move nasty cruft from make.rules' $(CUTCRUFT) here, mostly to clean up
make.rules.
Diffstat (limited to 'Doc')
-rwxr-xr-xDoc/tools/sgmlconv/fixgenents.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/tools/sgmlconv/fixgenents.sh b/Doc/tools/sgmlconv/fixgenents.sh
index 117b415..0503d7b 100755
--- a/Doc/tools/sgmlconv/fixgenents.sh
+++ b/Doc/tools/sgmlconv/fixgenents.sh
@@ -2,6 +2,9 @@
#
# Script to fix general entities that got translated from the LaTeX as empty
# elements. Mostly pretty bogus, but works like a charm!
+#
+# Removes the leading XML PI that identifies the XML version, since most of
+# the XML files are not used as top-level documents.
if [ "$1" ]; then
exec <"$1"
@@ -13,7 +16,7 @@ if [ "$1" ]; then
shift 1
fi
-sed '
+grep -v '^<?xml .*?>$$' | sed '
s|<ABC/>|\&ABC;|g
s|<ASCII/>|\&ASCII;|g
s|<C/>|\&C;|g