| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Windows can't run .sh files, so this is a Python implementation of | 6 """Windows can't run .sh files, so this is a Python implementation of |
| 7 update.sh. This script should replace update.sh on all platforms eventually.""" | 7 update.sh. This script should replace update.sh on all platforms eventually.""" |
| 8 | 8 |
| 9 import argparse | 9 import argparse |
| 10 import contextlib | 10 import contextlib |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 import time | 21 import time |
| 22 import urllib2 | 22 import urllib2 |
| 23 import zipfile | 23 import zipfile |
| 24 | 24 |
| 25 from os.path import dirname, join | 25 from os.path import dirname, join |
| 26 | 26 |
| 27 import utils | 27 import utils |
| 28 | 28 |
| 29 # Path constants. (All of these should be absolute paths.) | 29 # Path constants. (All of these should be absolute paths.) |
| 30 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) | 30 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) |
| 31 FLETCH_ROOT_DIR = os.path.abspath(os.path.join(THIS_DIR, '..')) | 31 DARTINO_ROOT_DIR = os.path.abspath(os.path.join(THIS_DIR, '..')) |
| 32 THIRD_PARTY_DIR = os.path.join(FLETCH_ROOT_DIR, 'third_party') | 32 THIRD_PARTY_DIR = os.path.join(DARTINO_ROOT_DIR, 'third_party') |
| 33 | 33 |
| 34 def GetClangDir(system): | 34 def GetClangDir(system): |
| 35 return os.path.join(THIRD_PARTY_DIR, 'clang', system) | 35 return os.path.join(THIRD_PARTY_DIR, 'clang', system) |
| 36 | 36 |
| 37 def GetStampFile(system): | 37 def GetStampFile(system): |
| 38 return os.path.join(THIRD_PARTY_DIR, 'clang', '%s.stamp' % system) | 38 return os.path.join(THIRD_PARTY_DIR, 'clang', '%s.stamp' % system) |
| 39 | 39 |
| 40 # URL for pre-built binaries. | 40 # URL for pre-built binaries. |
| 41 CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang' | 41 CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang' |
| 42 | 42 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 # Don't buffer stdout, so that print statements are immediately flushed. | 148 # Don't buffer stdout, so that print statements are immediately flushed. |
| 149 # Do this only after --print-revision has been handled, else we'll get | 149 # Do this only after --print-revision has been handled, else we'll get |
| 150 # an error message when this script is run from gn for some reason. | 150 # an error message when this script is run from gn for some reason. |
| 151 sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) | 151 sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) |
| 152 | 152 |
| 153 return UpdateClang(args) | 153 return UpdateClang(args) |
| 154 | 154 |
| 155 | 155 |
| 156 if __name__ == '__main__': | 156 if __name__ == '__main__': |
| 157 sys.exit(main()) | 157 sys.exit(main()) |
| OLD | NEW |