瀏覽代碼

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>
Ed Bartosh 8 年之前
父節點
當前提交
3c3f5c5160
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      scripts/oe-trim-schemas

+ 9 - 0
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():