New utility to convert footer of XML db file
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 17 Oct 2011 08:45:59 +0000 (10:45 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 17 Oct 2011 08:45:59 +0000 (10:45 +0200)
fixup-headers/sgml-to-nxml.sh [new file with mode: 0755]

diff --git a/fixup-headers/sgml-to-nxml.sh b/fixup-headers/sgml-to-nxml.sh
new file mode 100755 (executable)
index 0000000..8b2bb1a
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Put nxml footer in XML file if it already exists
+#  this is to replace old sgml mode
+for f in `find . \( -name '*.xml' \) -print`; do
+       echo $f
+       sed '/^Local variables:/ {
+a\
+mode: nxml\
+nxml-child-indent: 1\
+End:\
+-->
+q
+}' < $f >${f}_new
+       mv ${f}_new $f
+done
+