diff options
Diffstat (limited to 'scripts/yocto-layer')
-rwxr-xr-x | scripts/yocto-layer | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/yocto-layer b/scripts/yocto-layer index f75927552e..53d2aabd3f 100755 --- a/scripts/yocto-layer +++ b/scripts/yocto-layer | |||
@@ -60,19 +60,24 @@ def yocto_layer_create_subcommand(args, usage_str): | |||
60 | default = False, help = "dump the generated code to layergen.out") | 60 | default = False, help = "dump the generated code to layergen.out") |
61 | (options, args) = parser.parse_args(args) | 61 | (options, args) = parser.parse_args(args) |
62 | 62 | ||
63 | if len(args) != 1: | 63 | if len(args) < 1 or len(args) > 2: |
64 | logging.error("Wrong number of arguments, exiting\n") | 64 | logging.error("Wrong number of arguments, exiting\n") |
65 | parser.print_help() | 65 | parser.print_help() |
66 | sys.exit(1) | 66 | sys.exit(1) |
67 | 67 | ||
68 | layer_name = args[0] | 68 | layer_name = args[0] |
69 | properties = "" | ||
70 | |||
71 | if len(args) == 2: | ||
72 | layer_priority = args[1] | ||
73 | properties = '{"layer_priority":"' + layer_priority + '"}' | ||
69 | 74 | ||
70 | if options.outdir: | 75 | if options.outdir: |
71 | layer_output_dir = options.outdir | 76 | layer_output_dir = options.outdir |
72 | else: | 77 | else: |
73 | layer_output_dir = "meta-" + layer_name | 78 | layer_output_dir = "meta-" + layer_name |
74 | 79 | ||
75 | yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file) | 80 | yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file, properties) |
76 | 81 | ||
77 | 82 | ||
78 | def yocto_layer_list_subcommand(args, usage_str): | 83 | def yocto_layer_list_subcommand(args, usage_str): |