| # Copyright 2020 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| This script is used to download the clang update script. It runs as a gclient |
| It's equivalent to using curl to download the latest update script. |
| SCRIPT_DOWNLOAD_URL = ('https://raw.githubusercontent.com/chromium/' |
| 'chromium/{}/tools/clang/scripts/update.py') |
| return SCRIPT_DOWNLOAD_URL.format(revision or "main") |
| parser = argparse.ArgumentParser( |
| description='download the clang update script') |
| parser.add_argument('--output', help='path to file to create/overwrite') |
| parser.add_argument('--revision', help='revision to download') |
| args = parser.parse_args() |
| return 0 if curlish.curlish(get_url(args.revision), args.output) else 1 |
| if __name__ == '__main__': |