| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 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 """Downloads and unpacks a toolchain for building on Windows. The contents are | 6 """Downloads and unpacks a toolchain for building on Windows. The contents are |
| 7 matched by sha1 which will be updated when the toolchain is updated. | 7 matched by sha1 which will be updated when the toolchain is updated. |
| 8 | 8 |
| 9 Having a toolchain script in depot_tools means that it's not versioned | 9 Having a toolchain script in depot_tools means that it's not versioned |
| 10 directly with the source code. That is, if the toolchain is upgraded, but | 10 directly with the source code. That is, if the toolchain is upgraded, but |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 print 'You appear to be a Googler.' | 159 print 'You appear to be a Googler.' |
| 160 print | 160 print |
| 161 print 'I\'m sorry for the hassle, but you need to do a one-time manual' | 161 print 'I\'m sorry for the hassle, but you need to do a one-time manual' |
| 162 print 'authentication. Please run:' | 162 print 'authentication. Please run:' |
| 163 print | 163 print |
| 164 print ' download_from_google_storage --config' | 164 print ' download_from_google_storage --config' |
| 165 print | 165 print |
| 166 print 'and follow the instructions.' | 166 print 'and follow the instructions.' |
| 167 print | 167 print |
| 168 print 'NOTE 1: Use your google.com credentials, not chromium.org.' | 168 print 'NOTE 1: Use your google.com credentials, not chromium.org.' |
| 169 print 'NOTE 2: Just press Enter when asked for a "project-id".' | 169 print 'NOTE 2: Enter 0 when asked for a "project-id".' |
| 170 print | 170 print |
| 171 print '-----------------------------------------------------------------' | 171 print '-----------------------------------------------------------------' |
| 172 print | 172 print |
| 173 sys.stdout.flush() | 173 sys.stdout.flush() |
| 174 sys.exit(1) | 174 sys.exit(1) |
| 175 | 175 |
| 176 | 176 |
| 177 def DelayBeforeRemoving(target_dir): | 177 def DelayBeforeRemoving(target_dir): |
| 178 """A grace period before deleting the out of date toolchain directory.""" | 178 """A grace period before deleting the out of date toolchain directory.""" |
| 179 if (os.path.isdir(target_dir) and | 179 if (os.path.isdir(target_dir) and |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 if options.output_json: | 264 if options.output_json: |
| 265 shutil.copyfile(os.path.join(target_dir, '..', 'data.json'), | 265 shutil.copyfile(os.path.join(target_dir, '..', 'data.json'), |
| 266 options.output_json) | 266 options.output_json) |
| 267 | 267 |
| 268 return 0 | 268 return 0 |
| 269 | 269 |
| 270 | 270 |
| 271 if __name__ == '__main__': | 271 if __name__ == '__main__': |
| 272 sys.exit(main()) | 272 sys.exit(main()) |
| OLD | NEW |