summaryrefslogtreecommitdiffstats
path: root/scripts/devtool
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-xscripts/devtool15
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/devtool b/scripts/devtool
index 5d37d3b4a4..1c2243812a 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -189,6 +189,7 @@ def main():
189 add_help=False, 189 add_help=False,
190 epilog="Use %(prog)s <subcommand> --help to get help on a specific command") 190 epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
191 parser.add_argument('--basepath', help='Base directory of SDK / build directory') 191 parser.add_argument('--basepath', help='Base directory of SDK / build directory')
192 parser.add_argument('--bbpath', help='Explicitly specify the BBPATH, rather than getting it from the metadata')
192 parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') 193 parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
193 parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') 194 parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
194 parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') 195 parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
@@ -239,12 +240,18 @@ def main():
239 240
240 scriptutils.logger_setup_color(logger, global_args.color) 241 scriptutils.logger_setup_color(logger, global_args.color)
241 242
242 tinfoil = setup_tinfoil(config_only=True) 243 if global_args.bbpath is None:
243 for path in ([scripts_path] + 244 tinfoil = setup_tinfoil(config_only=True)
244 tinfoil.config_data.getVar('BBPATH', True).split(':')): 245 global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True)
246 else:
247 tinfoil = None
248
249 for path in [scripts_path] + global_args.bbpath.split(':'):
245 pluginpath = os.path.join(path, 'lib', 'devtool') 250 pluginpath = os.path.join(path, 'lib', 'devtool')
246 scriptutils.load_plugins(logger, plugins, pluginpath) 251 scriptutils.load_plugins(logger, plugins, pluginpath)
247 tinfoil.shutdown() 252
253 if tinfoil:
254 tinfoil.shutdown()
248 255
249 subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>') 256 subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
250 257