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:47:29 +0000 |
commit | a9fac12157ed434a6711de1af77eda1f4a8e9e8a (patch) | |
tree | fc7c9e435c775573a9d47e4834c0c0154da5646b /scripts/oe-trim-schemas | |
parent | e1c96125ea674509fbc9b36dc671b7a53bd848ac (diff) | |
download | openembedded-core-a9fac12157ed434a6711de1af77eda1f4a8e9e8a.tar.gz openembedded-core-a9fac12157ed434a6711de1af77eda1f4a8e9e8a.tar.bz2 openembedded-core-a9fac12157ed434a6711de1af77eda1f4a8e9e8a.zip |
oe-trim-schemas: create usage output
Created usage output for oe-trim-schemas script.
[YOCTO #10751]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/oe-trim-schemas')
-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): l = [e for e in l if e.tag == name] return l +if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'): + print('oe-trim-schemas: error: the following arguments are required: schema\n' + 'Usage: oe-trim-schemas schema\n\n' + 'OpenEmbedded trim schemas - remove unneeded schema locale translations\n' + ' from gconf schema files\n\n' + 'arguments:\n' + ' schema gconf schema file to trim\n') + sys.exit(2) + xml = etree.parse(sys.argv[1]) for schema in child(xml.getroot(), "schemalist").getchildren(): |