You've already forked openscreen

The license header presubmit check enforces the new license header format which removes the string "All Rights Reserved." Chromium was updated but not our repo, so doing this now so that unrelated changes aren't blocked on license headers. To pass cpplint, this also fixes a number of IWYU issues and also adds `noexcept` to move operators. Bug: b/288403513 Change-Id: I90b2e58dcc2bdd1762129c7b5894e3a2730da51b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/4638621 Commit-Queue: Mark Foltz <mfoltz@chromium.org> Reviewed-by: Muyao Xu <muyaoxu@google.com>
35 lines
946 B
Python
Executable File
35 lines
946 B
Python
Executable File
#!/usr/bin/env python3
|
|
# 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
|
|
hook.
|
|
|
|
It's equivalent to using curl to download the latest update script.
|
|
"""
|
|
|
|
import argparse
|
|
import curlish
|
|
import sys
|
|
|
|
SCRIPT_DOWNLOAD_URL = ('https://raw.githubusercontent.com/chromium/'
|
|
'chromium/main/tools/clang/scripts/update.py')
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description='Download a file.')
|
|
parser.add_argument('--output', help='Path to file to create/overwrite.')
|
|
args = parser.parse_args()
|
|
|
|
if not args.output:
|
|
print('usage: download-clang-update-script.py --output=/a/b/update.py')
|
|
return 1
|
|
|
|
return 0 if curlish.curlish(SCRIPT_DOWNLOAD_URL, args.output) else 1
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main())
|