Created
July 22, 2011 21:28
-
-
Save figital/1100470 to your computer and use it in GitHub Desktop.
a shell script to download the most recent chromium build for linux
This file contains 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
#/bin/sh | |
# quick hack to automate local user bleeding-edge chromium build installs | |
# how do you like to call this program? (chrome-linux, chrome, chromium, google-chrome?) | |
APPNAME="chromium" | |
# get the latest build number (JSON) | |
VERSION=$(wget -qO- http://build.chromium.org/f/chromium/snapshots/Linux/LATEST) | |
# get some extra metadata to display on the command line | |
LOGURL="http://build.chromium.org/f/chromium/snapshots/Linux/"$VERSION"/REVISIONS" | |
LOG=$(wget -qO- $LOGURL) | |
# build the URL of the file we'll be downloading | |
DOWNLOADURL="http://build.chromium.org/f/chromium/snapshots/Linux/"$VERSION"/chrome-linux.zip" | |
# Here's some command line output ... | |
echo -e "\r\n-------------------------" | |
echo "BUILD: "$VERSION | |
echo $LOGURL | |
echo $LOG | |
echo -e "-------------------------\r\n" | |
# if this was already downloaded, then it would either need to be deleted or aborted | |
# where should we put this 37MB download? | |
tempfile="/tmp/chrome-linux-"$VERSION".zip" | |
tempdir="/tmp/chrome-linux/"$VERSION | |
# just putting this in my home directory now because i'm lazy | |
permdir=~/$APPNAME"/"$VERSION | |
# get the large download ... | |
wget $DOWNLOADURL -O $tempfile | |
mkdir -p $permdir | |
unzip $tempfile -d $permdir | |
# if the symlink exists it needs to be removed now | |
# actually, this should be linked to the user's personal bin space and sudo/password wouldn't be needed ... | |
# (so for time being it's needing password :( | |
sudo rm "/usr/local/bin/"$APPNAME | |
sudo ln -s $permdir"/chrome-linux/chrome" "/usr/local/bin/"$APPNAME | |
echo "All done! ...." | |
# you forgot to delete the tempdir stuff after the unzipping :( | |
# although it's in /tmp and should be wiped next reboot |
I'd be interested in testing/tuning the script for Fedora Core 16 ... but I'll leave version 8 up to you Samy ;).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had moved this to its own repo awhile ago which has the updated URL(s): https://github.com/figital/get-chromium. I use this every few days on a recent build of CrunchBang which is Debian-based.
You should also certainly checkout @cowboy's scripts which have some nice extra functionality and are tuned for OSX.