OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 # XXX: this isn't in the standard library |
| 7 import httplib2 |
| 8 |
| 9 |
| 10 # XXX: share these with download_nacl_irt.py |
| 11 archs = ['x86_32', 'x86_64'] |
| 12 |
| 13 base_url = 'http://commondatastorage.googleapis.com/nativeclient-archive2/irt' |
| 14 |
| 15 |
| 16 def UrlExists(url): |
| 17 response, data = httplib2.Http().request(url, 'HEAD') |
| 18 return response.status == 200 |
| 19 |
| 20 |
| 21 def Main(): |
| 22 rev = 5456 # XXX: should query this from SVN |
| 23 while True: |
| 24 available_archs = [] |
| 25 for arch in archs: |
| 26 url = '%s/r%s/irt_%s.nexe' % (base_url, rev, arch) |
| 27 if UrlExists(url): |
| 28 available_archs.append(arch) |
| 29 if available_archs == archs: |
| 30 status = 'complete' |
| 31 else: |
| 32 status = 'incomplete' |
| 33 print rev, status, available_archs |
| 34 rev -= 1 |
| 35 |
| 36 |
| 37 if __name__ == '__main__': |
| 38 Main() |
OLD | NEW |