summaryrefslogtreecommitdiffstats
path: root/scripts/devtool
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-xscripts/devtool18
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():
112 break 112 break
113 113
114def create_workspace(args, config, basepath, workspace): 114def create_workspace(args, config, basepath, workspace):
115 if args.directory: 115 if args.layerpath:
116 workspacedir = os.path.abspath(args.directory) 116 workspacedir = os.path.abspath(args.layerpath)
117 else: 117 else:
118 workspacedir = os.path.abspath(os.path.join(basepath, 'workspace')) 118 workspacedir = os.path.abspath(os.path.join(basepath, 'workspace'))
119 _create_workspace(workspacedir, config, basepath, args.create_only) 119 _create_workspace(workspacedir, config, basepath, args.create_only)
@@ -177,18 +177,20 @@ def main():
177 pth = os.path.dirname(pth) 177 pth = os.path.dirname(pth)
178 178
179 parser = argparse.ArgumentParser(description="OpenEmbedded development tool", 179 parser = argparse.ArgumentParser(description="OpenEmbedded development tool",
180 epilog="Use %(prog)s <command> --help to get help on a specific command") 180 epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
181 parser.add_argument('--basepath', help='Base directory of SDK / build directory') 181 parser.add_argument('--basepath', help='Base directory of SDK / build directory')
182 parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') 182 parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
183 parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') 183 parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
184 parser.add_argument('--color', help='Colorize output', choices=['auto', 'always', 'never'], default='auto') 184 parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
185 185
186 subparsers = parser.add_subparsers(dest="subparser_name") 186 subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
187 187
188 if not context.fixed_setup: 188 if not context.fixed_setup:
189 parser_create_workspace = subparsers.add_parser('create-workspace', help='Set up a workspace') 189 parser_create_workspace = subparsers.add_parser('create-workspace',
190 parser_create_workspace.add_argument('directory', nargs='?', help='Directory for the workspace') 190 help='Set up a workspace',
191 parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace, do not alter configuration') 191 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.')
192 parser_create_workspace.add_argument('layerpath', nargs='?', help='Path in which the workspace layer should be created')
193 parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace layer, do not alter configuration')
192 parser_create_workspace.set_defaults(func=create_workspace) 194 parser_create_workspace.set_defaults(func=create_workspace)
193 195
194 scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'devtool')) 196 scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'devtool'))