diff --git a/build/patch_all_entities b/build/patch_all_entities new file mode 100755 index 00000000..b9042c2e --- /dev/null +++ b/build/patch_all_entities @@ -0,0 +1,4 @@ +#!/bin/bash + +find ../entities -name uk\*.xml \ + -exec perl -i patch_entity.pl \{\} \; diff --git a/build/patch_entity.pl b/build/patch_entity.pl new file mode 100644 index 00000000..77b15d1c --- /dev/null +++ b/build/patch_entity.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl + +$seen = 0; + +while (<>) { + if (/^\s+http:\/\/ukfederation.org.uk\/2006\/11\/label/) { + $seen = 1; # don't apply the change twice to the same file + } + if (!$seen && /^(\s+)http:\/\/www.w3.org\/2001\/04\/xmlenc/) { + print "$1http://ukfederation.org.uk/2006/11/label uk-fed-label.xsd\n"; + } + print $_; +} \ No newline at end of file