| Index: build/find_nacl_irt_revisions.py
|
| diff --git a/build/find_nacl_irt_revisions.py b/build/find_nacl_irt_revisions.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3793730d57195d296a773f10844fe90551c99e1c
|
| --- /dev/null
|
| +++ b/build/find_nacl_irt_revisions.py
|
| @@ -0,0 +1,38 @@
|
| +#!/usr/bin/env python
|
| +# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +# XXX: this isn't in the standard library
|
| +import httplib2
|
| +
|
| +
|
| +# XXX: share these with download_nacl_irt.py
|
| +archs = ['x86_32', 'x86_64']
|
| +
|
| +base_url = 'http://commondatastorage.googleapis.com/nativeclient-archive2/irt'
|
| +
|
| +
|
| +def UrlExists(url):
|
| + response, data = httplib2.Http().request(url, 'HEAD')
|
| + return response.status == 200
|
| +
|
| +
|
| +def Main():
|
| + rev = 5456 # XXX: should query this from SVN
|
| + while True:
|
| + available_archs = []
|
| + for arch in archs:
|
| + url = '%s/r%s/irt_%s.nexe' % (base_url, rev, arch)
|
| + if UrlExists(url):
|
| + available_archs.append(arch)
|
| + if available_archs == archs:
|
| + status = 'complete'
|
| + else:
|
| + status = 'incomplete'
|
| + print rev, status, available_archs
|
| + rev -= 1
|
| +
|
| +
|
| +if __name__ == '__main__':
|
| + Main()
|
|
|