blob: 86900250ec4319d3e0cc907764a6ddb628d7bd71 [file] [log] [blame]
Yang Guo4fd355c2019-09-19 10:59:03 +02001# Copyright 2019 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4"""
5Update manually maintained dependencies from Chromium.
6"""
7
8import argparse
9import os
10import shutil
11import sys
12
13FILES = [
14 ['v8', 'include', 'js_protocol.pdl'],
15 ['third_party', 'blink', 'renderer', 'core', 'css', 'css_properties.json5'],
16 ['third_party', 'blink', 'renderer', 'core', 'html', 'aria_properties.json5'],
17 ['third_party', 'blink', 'renderer', 'core', 'inspector', 'browser_protocol.pdl'],
18 ['third_party', 'axe-core', 'axe.d.ts'],
19 ['third_party', 'axe-core', 'axe.js'],
20 ['third_party', 'axe-core', 'axe.min.js'],
21 ['third_party', 'axe-core', 'LICENSE'],
22]
23
24
25def parse_options(cli_args):
26 parser = argparse.ArgumentParser(description='Roll dependencies from Chromium.')
27 parser.add_argument('chromium_dir', help='Chromium directory')
28 parser.add_argument('devtools_dir', help='DevTools directory')
29 return parser.parse_args(cli_args)
30
31
32def copy_files(options):
33 for file in FILES:
34 shutil.copy(os.path.join(options.chromium_dir, *file), os.path.join(options.devtools_dir, *file))
35
36
37if __name__ == '__main__':
38 OPTIONS = parse_options(sys.argv[1:])
39 copy_files(OPTIONS)