diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-12-08 18:56:49 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-13 22:55:20 +0000 |
commit | 3c3f5c5160927c9c3fd1187c55add4f23cc3cdfd (patch) | |
tree | 5503a108508f8eeb504bd1fa91c1b166ac90f9f2 | |
parent | e8fbd7158b418b6d509330848837a6da3399a75c (diff) | |
download | poky-3c3f5c5160927c9c3fd1187c55add4f23cc3cdfd.tar.gz |
oe-trim-schemas: create usage output
Created usage output for oe-trim-schemas script.
[YOCTO #10751]
(From OE-Core rev: a9fac12157ed434a6711de1af77eda1f4a8e9e8a)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/oe-trim-schemas | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/oe-trim-schemas b/scripts/oe-trim-schemas index 66a1b8d81d..7c199ef1df 100755 --- a/scripts/oe-trim-schemas +++ b/scripts/oe-trim-schemas | |||
@@ -18,6 +18,15 @@ def children (elem, name=None): | |||
18 | l = [e for e in l if e.tag == name] | 18 | l = [e for e in l if e.tag == name] |
19 | return l | 19 | return l |
20 | 20 | ||
21 | if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'): | ||
22 | print('oe-trim-schemas: error: the following arguments are required: schema\n' | ||
23 | 'Usage: oe-trim-schemas schema\n\n' | ||
24 | 'OpenEmbedded trim schemas - remove unneeded schema locale translations\n' | ||
25 | ' from gconf schema files\n\n' | ||
26 | 'arguments:\n' | ||
27 | ' schema gconf schema file to trim\n') | ||
28 | sys.exit(2) | ||
29 | |||
21 | xml = etree.parse(sys.argv[1]) | 30 | xml = etree.parse(sys.argv[1]) |
22 | 31 | ||
23 | for schema in child(xml.getroot(), "schemalist").getchildren(): | 32 | for schema in child(xml.getroot(), "schemalist").getchildren(): |