From aa717457ad4513f761555bbb1dd57867930ea0b2 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 17 Oct 2011 10:45:59 +0200 Subject: [PATCH] New utility to convert footer of XML db file --- fixup-headers/sgml-to-nxml.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 fixup-headers/sgml-to-nxml.sh diff --git a/fixup-headers/sgml-to-nxml.sh b/fixup-headers/sgml-to-nxml.sh new file mode 100755 index 0000000..8b2bb1a --- /dev/null +++ b/fixup-headers/sgml-to-nxml.sh @@ -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 + -- 1.7.10.4