From: Adam Dickmeiss Date: Mon, 17 Oct 2011 08:45:59 +0000 (+0200) Subject: New utility to convert footer of XML db file X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=aa717457ad4513f761555bbb1dd57867930ea0b2;p=git-tools-moved-to-github.git New utility to convert footer of XML db file --- 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 +