diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-05 14:03:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-07 18:52:45 +0000 |
commit | ec3378f3a7013e289daa0f5c52329488b861f99c (patch) | |
tree | ce4c8949d38d748568816b5687cc5d949f9d9f56 /scripts/devtool | |
parent | f0ba400a398a172f9ebf953bb3a26e5d911a17d6 (diff) | |
download | openembedded-core-ec3378f3a7013e289daa0f5c52329488b861f99c.tar.gz openembedded-core-ec3378f3a7013e289daa0f5c52329488b861f99c.tar.bz2 openembedded-core-ec3378f3a7013e289daa0f5c52329488b861f99c.zip |
devtool: improve command-line help
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>
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-x | scripts/devtool | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/devtool b/scripts/devtool index d6e1b9710d..981ff515d3 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -112,8 +112,8 @@ def read_workspace(): break def create_workspace(args, config, basepath, workspace): - if args.directory: - workspacedir = os.path.abspath(args.directory) + if args.layerpath: + workspacedir = os.path.abspath(args.layerpath) else: workspacedir = os.path.abspath(os.path.join(basepath, 'workspace')) _create_workspace(workspacedir, config, basepath, args.create_only) @@ -177,18 +177,20 @@ def main(): pth = os.path.dirname(pth) parser = argparse.ArgumentParser(description="OpenEmbedded development 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('--basepath', help='Base directory of SDK / build directory') 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') + 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(dest="subparser_name") + subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>') if not context.fixed_setup: - parser_create_workspace = subparsers.add_parser('create-workspace', help='Set up a workspace') - parser_create_workspace.add_argument('directory', nargs='?', help='Directory for the workspace') - parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace, do not alter configuration') + parser_create_workspace = subparsers.add_parser('create-workspace', + help='Set up a workspace', + description='Sets up a new workspace. NOTE: other devtool subcommands will create a workspace automatically as needed, so you only need to use %(prog)s if you want to specify where the workspace should be located.') + parser_create_workspace.add_argument('layerpath', nargs='?', help='Path in which the workspace layer should be created') + parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace layer, do not alter configuration') parser_create_workspace.set_defaults(func=create_workspace) scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'devtool')) |