Skip to content

Instantly share code, notes, and snippets.

@smajda
Created August 25, 2009 17:55
Show Gist options
  • Save smajda/174880 to your computer and use it in GitHub Desktop.
Save smajda/174880 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
workdir='~/Downloads';
latest=`curl -L -s http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/LATEST`
cd $workdir;
curl -L http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/$latest/chrome-mac.zip -o $workdir/chrome-mac-latest.zip
# kill chromium if it's running
if [[ `killall Chromium` ]]; then
echo 'Chromium stopped';
fi
# if previous chrome-mac directory is there, delete it
if [[ -d $workdir/chrome-mac ]]; then
rm -rf $workdir/chrome-mac;
fi
# unzip
unzip $workdir/chrome-mac-latest.zip;
# copy to /Applications
# cpmac is part of developer tools, I think
mv /Applications/Chromium.app ~/.Trash/Chromium.app.`date +%Y%m%d-%H%M` && \
/usr/bin/cpmac -r chrome-mac/Chromium.app /Applications/Chromium.app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment