]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: improve command-line help
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 5 Feb 2015 14:04:00 +0000 (14:04 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 7 Feb 2015 18:52:45 +0000 (18:52 +0000)
Based on feedback from Scott Rifenbark <scott.m.rifenbark@intel.com>

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/recipetool/create.py
scripts/recipetool

index 38f5eadaf5bb3dd3b4ee061fdd8ab014ddc3cc81..290fc1386b1aec96441d7a86393cb91ba5f63ef2 100644 (file)
@@ -406,10 +406,12 @@ def convert_debian(debpath):
 
 
 def register_command(subparsers):
-    parser_create = subparsers.add_parser('create', help='Create a new recipe')
+    parser_create = subparsers.add_parser('create',
+                                          help='Create a new recipe',
+                                          description='Creates a new recipe from a source tree')
     parser_create.add_argument('source', help='Path or URL to source')
-    parser_create.add_argument('-o', '--outfile', help='Full path and filename to recipe to add', required=True)
+    parser_create.add_argument('-o', '--outfile', help='Specify filename for recipe to create', required=True)
     parser_create.add_argument('-m', '--machine', help='Make recipe machine-specific as opposed to architecture-specific', action='store_true')
-    parser_create.add_argument('-x', '--externalsrc', help='Assuming source is a URL, fetch it and extract it to the specified directory')
+    parser_create.add_argument('-x', '--extract-to', metavar='EXTRACTPATH', help='Assuming source is a URL, fetch it and extract it to the directory specified as %(metavar)s')
     parser_create.set_defaults(func=create_recipe)
 
index 70e6b6c8770e62e341a91dd678158d53582f5a28..2cfa76320182334e3a63a7c6c0d712e89be890ec 100755 (executable)
@@ -49,11 +49,11 @@ def main():
         sys.exit(1)
 
     parser = argparse.ArgumentParser(description="OpenEmbedded recipe tool",
-                                     epilog="Use %(prog)s <command> --help to get help on a specific command")
+                                     epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
     parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
     parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
-    parser.add_argument('--color', help='Colorize output', choices=['auto', 'always', 'never'], default='auto')
-    subparsers = parser.add_subparsers()
+    parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
+    subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>')
 
     scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'recipetool'))
     registered = False