| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python |
| 2 | |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # 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 |
| 5 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 6 | 5 |
| 7 """Fetch prebuilt binaries to run PyAuto. | 6 """Fetch prebuilt binaries to run PyAuto. |
| 8 | 7 |
| 9 Sets up Chrome and PyAuto binaries using prebuilt binaries from the | 8 Sets up Chrome and PyAuto binaries using prebuilt binaries from the |
| 10 continuous build archives. Works on mac, win, linux (32 & 64 bit). | 9 continuous build archives. Works on mac, win, linux (32 & 64 bit). |
| 11 | 10 |
| 12 Examples: | 11 Examples: |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 os.chdir(self._outdir) | 164 os.chdir(self._outdir) |
| 166 framework = glob.glob(os.path.join( | 165 framework = glob.glob(os.path.join( |
| 167 mac_app_name, 'Contents', 'Versions', '*', '*.framework'))[0] | 166 mac_app_name, 'Contents', 'Versions', '*', '*.framework'))[0] |
| 168 print framework | 167 print framework |
| 169 dest = os.path.basename(framework) | 168 dest = os.path.basename(framework) |
| 170 os.path.lexists(dest) and os.remove(dest) | 169 os.path.lexists(dest) and os.remove(dest) |
| 171 print 'Creating symlink "%s"' % dest | 170 print 'Creating symlink "%s"' % dest |
| 172 os.symlink(framework, dest) | 171 os.symlink(framework, dest) |
| 173 | 172 |
| 174 print 'Prepared binaries in "%s"' % self._outdir | 173 print 'Prepared binaries in "%s"' % self._outdir |
| 174 return 0 |
| 175 | 175 |
| 176 | 176 |
| 177 if __name__ == '__main__': | 177 if __name__ == '__main__': |
| 178 FetchPrebuilt().Run() | 178 sys.exit(FetchPrebuilt().Run()) |
| OLD | NEW |