Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] oe-trim-schemas: create usage output
@ 2016-12-08 16:56 Ed Bartosh
  0 siblings, 0 replies; only message in thread
From: Ed Bartosh @ 2016-12-08 16:56 UTC (permalink / raw)
  To: openembedded-core

Created usage output for oe-trim-schemas script.

[YOCTO #10751]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 scripts/oe-trim-schemas | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/oe-trim-schemas b/scripts/oe-trim-schemas
index 66a1b8d..7c199ef 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():
-- 
2.1.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-08 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 16:56 [PATCH] oe-trim-schemas: create usage output Ed Bartosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox