blob: 10d9ee2352c29752817865c85903e679543aaf3a [file] [log] [blame]
Tim van der Lippe790b9292019-09-19 15:14:16 +00001#!/usr/bin/env python
2# -*- coding: UTF-8 -*-
3#
4# Copyright 2019 The Chromium Authors. All rights reserved.
5# Use of this source code is governed by a BSD-style license that can be
6# found in the LICENSE file.
7"""
8Copies the modules into the resources folder
9"""
10
11from os.path import join, relpath
12import shutil
13import sys
14
15
16def main(argv):
17 try:
18 input_path_flag_index = argv.index('--input_path')
19 input_path = argv[input_path_flag_index + 1]
20 output_path_flag_index = argv.index('--output_path')
21 output_path = argv[output_path_flag_index + 1]
22 devtools_modules = argv[1:input_path_flag_index]
23 except:
24 print 'Usage: %s module_1 module_2 ... module_N --input_path <input_path> --output_path <output_path>' % argv[0]
25 raise
26
27 for file_name in devtools_modules:
28 shutil.copy(join(input_path, file_name), join(output_path, relpath(file_name, 'front_end')))
29
30
31if __name__ == '__main__':
32 sys.exit(main(sys.argv))