diff options
author | Bert Belder <bertbelder@gmail.com> | 2018-07-25 10:17:44 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2018-07-25 20:13:17 +0200 |
commit | 4d08bb85a4276292c2121b221b4840865a13cd42 (patch) | |
tree | d7da20a39432ddcfb9e43c4e1ad010d8db310230 /tools/run_hooks.py | |
parent | 0875411267d62a0fdcaf762657f19082b440fe36 (diff) |
Clean up and fix tools
* Make sync_third_party work in general
* Un-break build.py and run_hooks.py on windows
* Partially fix format.py on windows
* Reduce code duplication between run_hooks and sync_third_party
Diffstat (limited to 'tools/run_hooks.py')
-rwxr-xr-x | tools/run_hooks.py | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/tools/run_hooks.py b/tools/run_hooks.py index 58178a69c..59161f5f2 100755 --- a/tools/run_hooks.py +++ b/tools/run_hooks.py @@ -1,29 +1,7 @@ #!/usr/bin/env python -import os -import sys -from util import run +import third_party -root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -third_party_path = os.path.join(root_path, "third_party") -depot_tools_path = os.path.join(third_party_path, "depot_tools") -os.chdir(root_path) +third_party.fix_symlinks() - -def download(filename): - run([ - "python", - os.path.join(depot_tools_path + '/download_from_google_storage.py'), - '--platform=' + sys.platform, '--no_auth', '--bucket=chromium-gn', - '--sha1_file', - os.path.join(root_path, filename) - ]) - - -if sys.platform == 'win32': - download("third_party/v8/buildtools/win/gn.exe.sha1") -elif sys.platform == 'darwin': - download("third_party/v8/buildtools/mac/gn.sha1") -elif sys.platform.startswith('linux'): - download("third_party/v8/buildtools/linux64/gn.sha1") - -run(['python', 'third_party/v8/tools/clang/scripts/update.py', '--if-needed']) +third_party.download_gn() +third_party.download_clang() |