Skip to content

Instantly share code, notes, and snippets.

@jl2
Created January 28, 2011 20:35
Show Gist options
  • Save jl2/800894 to your computer and use it in GitHub Desktop.
Save jl2/800894 to your computer and use it in GitHub Desktop.
#!/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