Created
March 25, 2011 20:18
-
-
Save jl2/887563 to your computer and use it in GitHub Desktop.
Automatically install the latest build of Chromium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import subprocess | |
import http.client | |
# Install the latest Chromium snapshot build on Windows | |
conn = http.client.HTTPConnection('build.chromium.org') | |
conn.request("GET", '/f/chromium/snapshots/chromium-rel-xp/LATEST') | |
r1 = conn.getresponse() | |
version = r1.read().decode() | |
print("Upgrading to version", version) | |
conn.request("GET", '/f/chromium/snapshots/chromium-rel-xp/' + version + '/mini_installer.exe') | |
r2 = conn.getresponse() | |
ofname = os.environ['TEMP'] + '/mini_installer.exe' | |
with open(ofname, "wb") as outf: | |
outf.write(r2.read()) | |
conn.close() | |
subprocess.call(ofname) | |
os.unlink(ofname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment