| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 # vim: set ts=2 sw=2 et sts=2 ai: | 5 # vim: set ts=2 sw=2 et sts=2 ai: |
| 6 | 6 |
| 7 """Minimal tool to download binutils from Google storage. | 7 """Minimal tool to download binutils from Google storage. |
| 8 | 8 |
| 9 TODO(mithro): Replace with generic download_and_extract tool. | 9 TODO(mithro): Replace with generic download_and_extract tool. |
| 10 """ | 10 """ |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 arch = GetArch() | 104 arch = GetArch() |
| 105 if arch == 'x64': | 105 if arch == 'x64': |
| 106 return FetchAndExtract(arch) | 106 return FetchAndExtract(arch) |
| 107 if arch == 'ia32': | 107 if arch == 'ia32': |
| 108 ret = FetchAndExtract(arch) | 108 ret = FetchAndExtract(arch) |
| 109 if ret != 0: | 109 if ret != 0: |
| 110 return ret | 110 return ret |
| 111 # Fetch the x64 toolchain as well for official bots with 64-bit kernels. | 111 # Fetch the x64 toolchain as well for official bots with 64-bit kernels. |
| 112 return FetchAndExtract('x64') | 112 return FetchAndExtract('x64') |
| 113 print "Host architecture %s is not supported." % arch | 113 return 0 |
| 114 return 1 | |
| 115 | 114 |
| 116 | 115 |
| 117 if __name__ == '__main__': | 116 if __name__ == '__main__': |
| 118 sys.exit(main(sys.argv)) | 117 sys.exit(main(sys.argv)) |
| OLD | NEW |