3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
8 Invokes concatenate_application_code for applications specified on the command line.
12 import concatenate_application_code
17 import simplejson
as json
24 input_path_flag_index
= argv
.index('--input_path')
25 input_path
= argv
[input_path_flag_index
+ 1]
26 output_path_flag_index
= argv
.index('--output_path')
27 output_path
= argv
[output_path_flag_index
+ 1]
28 application_names
= argv
[1:input_path_flag_index
]
29 debug_flag_index
= argv
.index('--debug')
30 minify
= argv
[debug_flag_index
+ 1] == '0'
32 print('Usage: %s app_1 app_2 ... app_N --input_path <input_path> --output_path <output_path> --debug <0_or_1>' % argv
[0])
35 loader
= modular_build
.DescriptorLoader(input_path
)
36 for app
in application_names
:
37 concatenate_application_code
.build_application(app
, loader
, input_path
, output_path
, minify
)
39 if __name__
== '__main__':
40 sys
.exit(main(sys
.argv
))