Skip to content

Instantly share code, notes, and snippets.

@mlogan
Created May 28, 2014 00:28
Show Gist options
  • Save mlogan/28c258ddccdf394e5235 to your computer and use it in GitHub Desktop.
Save mlogan/28c258ddccdf394e5235 to your computer and use it in GitHub Desktop.
Script to install chromium version with working web worker debugger.
#!/bin/bash
# Based on https://gist.github.com/statico/5987019
# This is the latest build corresponding to Version 34.0.1847.0 (there are many).
# The next viable build (251950) is 34.0.1848.0
LATEST=251940
CURRENT=`defaults read /Applications/Chromium.app/Contents/Info SVNRevision 2>/dev/null`
PROCESSID=`ps ux | awk '/Chromium/ && !/awk/ {print $2}'`
if [[ $LATEST -eq $CURRENT ]]; then
echo "You're already up to date ($LATEST)"
exit 0
fi
if [ "${PROCESSID[0]}" ]; then
echo "Kill current instance of Chromium.app [y/n]"
read -n 1 -s confirmation
fi
if [ "$confirmation" = "y" ]; then
for x in $PROCESSID; do
kill -9 $x
done
else
if [ $confirmation ]; then
echo "Please close Chromium.app and restart the script"
exit 0
fi
fi
echo "Getting the latest version ($LATEST)"
curl -L "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/$LATEST/chrome-mac.zip" -o /tmp/chrome-mac.zip
wait
echo "Unzipping"
unzip -o -qq /tmp/chrome-mac.zip -d /tmp
wait
echo "Remove existing version"
rm -Rf /Applications/Chromium.app
wait
echo "Moving new version"
cp -R /tmp/chrome-mac/Chromium.app /Applications
wait
echo "Cleaning up"
rm -rf /tmp/chrome-*
echo "Done"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment