Created
January 28, 2011 20:35
-
-
Save jl2/800894 to your computer and use it in GitHub Desktop.
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 gosh | |
;; Update Windows Chromium to the latest build | |
(use rfc.http) | |
(define (web-get host url) | |
(receive (respCode headers body) (http-get host url) body)) | |
(define (main args) | |
(let* ((host "commondatastorage.googleapis.com") | |
(version-path "/chromium-browser-continuous/Win/LAST_CHANGE") | |
(version (web-get host version-path)) | |
(installer-path (string-append "/chromium-browser-continuous/Win/" version "/mini_installer.exe")) | |
(local-path (string-append (sys-getenv "TEMP") "/mini_installer.exe"))) | |
(print "Downloading Chromium build " version) | |
(call-with-output-file local-path | |
(lambda (out) (http-get host installer-path :sink out :flusher (lambda _ #t)))) | |
(print "Installing new build") | |
(sys-system local-path) | |
(print "Chromium install finished.") | |
0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment