Skip to content

Instantly share code, notes, and snippets.

@victusfate
Created December 11, 2010 13:04
Show Gist options
  • Save victusfate/737362 to your computer and use it in GitHub Desktop.
Save victusfate/737362 to your computer and use it in GitHub Desktop.
get the latest snapshot of chromium for mac or your favorite os, modified urls for snapshots original script from http://www.shad.cc/post/2010/01/How-to-auto-update-Chromium-on-Mac-OS-X,-Linux-and-other
#!/bin/sh
# Chromium update script
# - by shad <[email protected]>
# mac | linux | ...
OS=mac
LATEST=$(curl http://build.chromium.org/f/chromium/snapshots/chromium-rel-${OS}/LATEST)
echo latest build ${LATEST}
INSTALL_DIR=/Applications
TMP="/tmp/update-chrome-$RANDOM"
(
mkdir $TMP ; cd $TMP
echo Download...
echo url http://build.chromium.org/f/chromium/snapshots/chromium-rel-${OS}/${LATEST}/chrome-${OS}.zip
curl -O http://build.chromium.org/f/chromium/snapshots/chromium-rel-${OS}/${LATEST}/chrome-${OS}.zip
if [ $? -ne 0 ] ; then
echo Cannot update.
exit 1
fi
echo Unzip...
unzip -qq chrome-mac.zip
echo Copying...
rm -rf "${INSTALL_DIR}/Chromium.app"
mv chrome-$OS/Chromium.app "$INSTALL_DIR"
)
rm -rf $TMP
@tedpennings
Copy link

I really like this script. I've used it for a few months. Recently, Chromium changed the directory layout of their nightlies. I had to update the script to the following:

#!/bin/sh
# Chromium update script
# - by shad <[email protected]>
# http://shad.cc/

# mac | linux | ...
OS=Mac
os=$(echo ${OS} | tr '[A-Z]' '[a-z]')
LATEST=$(wget -q -O - http://build.chromium.org/buildbot/snapshots/${OS}/LATEST)
INSTALL_DIR=/Applications
TMP="/tmp/update-chrome-$RANDOM"

(
mkdir $TMP ; cd $TMP
echo Downloading revision ${LATEST}...
wget -q -O chrome.zip http://build.chromium.org/buildbot/snapshots/${OS}/${LATEST}/chrome-${os}.zip
if [ $? -ne 0 ] ; then
    echo Cannot update.
    exit 1
fi
echo Unzip...
unzip -qq chrome.zip
echo Copying...
rm -rf "${INSTALL_DIR}/Chromium.app"
mv chrome-$OS/Chromium.app "$INSTALL_DIR"
)

rm -rf $TMP

@victusfate
Copy link
Author

victusfate commented Jul 15, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment