aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/poky-trim-schemas
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-20 23:24:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-20 23:46:46 +0100
commit877b3d84597fcfc3abf5aa332019d412f2717896 (patch)
tree525dd2aaf0d72936e4569673dae67fab645d60c3 /scripts/poky-trim-schemas
parent27147ae60f22f5be257727b1ec69f48a7192ffb3 (diff)
downloadopenembedded-core-contrib-877b3d84597fcfc3abf5aa332019d412f2717896.tar.gz
Rename the remaining poky-* scripts to oe-* or runqemu-*
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/poky-trim-schemas')
-rwxr-xr-xscripts/poky-trim-schemas49
1 files changed, 0 insertions, 49 deletions
diff --git a/scripts/poky-trim-schemas b/scripts/poky-trim-schemas
deleted file mode 100755
index 29fb3a1b67..0000000000
--- a/scripts/poky-trim-schemas
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /usr/bin/env python
-
-import sys
-try:
- import xml.etree.cElementTree as etree
-except:
- import xml.etree.ElementTree as etree
-
-def child (elem, name):
- for e in elem.getchildren():
- if e.tag == name:
- return e
- return None
-
-def children (elem, name=None):
- l = elem.getchildren()
- if name:
- l = [e for e in l if e.tag == name]
- return l
-
-xml = etree.parse(sys.argv[1])
-
-for schema in child(xml.getroot(), "schemalist").getchildren():
- e = child(schema, "short")
- if e is not None:
- schema.remove(e)
-
- e = child(schema, "long")
- if e is not None:
- schema.remove(e)
-
- for locale in children(schema, "locale"):
- # One locale must exist so leave C locale...
- a = locale.attrib.get("name")
- if a == 'C':
- continue
- e = child(locale, "default")
- if e is None:
- schema.remove(locale)
- else:
- e = child(locale, "short")
- if e is not None:
- locale.remove(e)
- e = child(locale, "long")
- if e is not None:
- locale.remove(e)
-
-xml.write(sys.stdout, "UTF-8")
-