-
-
Save figital/1100470 to your computer and use it in GitHub Desktop.
#/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 |
You can probably just change the "Mac" or "mac" parts of the name to make mine work in Linux. I haven't tested this, however, but it might be worth a shot.
It's not working for me. I think, the URL http://build.chromium.org/f/chromium/snapshots/Linux/LATEST is not found. Please update with working URL.
FWIW, my version still works. It's meant for OS X, but should be easily tweakable: https://gist.github.com/1093476
OH!! Sorry I'm using Linux Fedora Core 8 version. Can you please give me the script for Linux (Fedora core 8)?. Thanks.
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.
I'd be interested in testing/tuning the script for Fedora Core 16 ... but I'll leave version 8 up to you Samy ;).
some things to do: