| 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 a Firefox Nightly build for the current platform.""" | 6 """Downloads a Firefox Nightly build for the current platform.""" |
| 7 | 7 |
| 8 import datetime | 8 import datetime |
| 9 import glob | 9 import glob |
| 10 import os | 10 import os |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 parser.error('You must specify the target directory.') | 147 parser.error('You must specify the target directory.') |
| 148 | 148 |
| 149 target_dir = options.target_dir | 149 target_dir = options.target_dir |
| 150 if not os.path.isdir(target_dir): | 150 if not os.path.isdir(target_dir): |
| 151 os.mkdir(target_dir) | 151 os.mkdir(target_dir) |
| 152 | 152 |
| 153 firefox_archive = _MaybeDownload(target_dir, options.force) | 153 firefox_archive = _MaybeDownload(target_dir, options.force) |
| 154 if firefox_archive: | 154 if firefox_archive: |
| 155 return _ExtractArchive(firefox_archive, target_dir) | 155 return _ExtractArchive(firefox_archive, target_dir) |
| 156 | 156 |
| 157 if options.clean_old_archives: | 157 if options.clean_old_firefox_archives: |
| 158 _CleanOldFirefoxArchives(target_dir) | 158 _CleanOldFirefoxArchives(target_dir) |
| 159 | 159 |
| 160 if __name__ == '__main__': | 160 if __name__ == '__main__': |
| 161 sys.exit(main()) | 161 sys.exit(main()) |
| OLD | NEW |