Created
April 18, 2010 15:50
-
-
Save johnmichel/370298 to your computer and use it in GitHub Desktop.
AppleScript for updating to the latest version 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
--Developed by Dominic Barnes | |
--Email: [email protected] | |
--http://dombarnes.com | |
--Modified by John Michel | |
--http://www.cowbird.org | |
--Version 0.5 | |
--find latest build number (old: from http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac/LATEST) | |
set the_source to do shell script "curl http://build.chromium.org/f/chromium/snapshots/Mac/LATEST" | |
--set local directory info | |
set remFile to "chrome-mac.zip" | |
set locDir to "~/" | |
set locFile to "chrome-mac.zip" | |
--download latest build using build number in the_source | |
-- http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/the_source/chrome-mac.zip currently redirects to http://v17.lscache8.c.bigcache.googleapis.com/chromium-browser-continuous/Mac/the_source/chrome-mac.zip | |
do shell script "curl http://build.chromium.org/f/chromium/snapshots/Mac/" & the_source & "/" & remFile & " -o " & locDir & locFile | |
--unpack and copy | |
do shell script "unzip -o " & locDir & locFile & " -d " & locDir | |
--move existing Chromium and copy new | |
try | |
do shell script "cp -pR /Applications/Chromium.app /Applications/Chromium.old.app" | |
do shell script "rm -R /Applications/Chromium.app" | |
end try | |
do shell script "mkdir -p /Applications/Chromium.app" | |
do shell script "mkdir -p /Applications/Chromium.app/Contents" | |
do shell script "cp -pR " & locDir & "chrome-mac/Chromium.app/Contents /Applications/Chromium.app" | |
--Cleanup folders and files | |
do shell script "rm -R " & locDir & "chrome*" | |
try | |
do shell script "rm -R /Applications/Chromium.old.app" | |
end try | |
display dialog "Chromium build " & the_source & " has been installed" | |
--Run Chromium | |
do shell script "open /Applications/Chromium.app" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment