Snippet: Chromium Snapshot Download (Cygwin) (Updated 3rd April)
#A snippet to download and run the latest build of the Chromium browser. Meant for Cygwin/Windows but can be adapted if needed.
If you need to use a proxy, set your http_proxy and https_proxy variables before using this.
Now updated to kill running Chrome/Chromium processes before running the installer (in case of locking issues). Also created a Bitbucket repo here for this script
if [ -f ./mini_installer.exe ]; then
echo "WARNING: Previous script run did not clean up"
rm ./mini_installer.exe
fi
if [ ! -f prev ]; then
echo "No previous build logged"
echo "-1" >prev
fi
if [[ `wget -q [commondatastorage.googleapis.com/chromium-...]([commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)Win/LAST_CHANGE) -O-` == `cat prev` ]]; then
echo "No build change (`wget -q [commondatastorage.googleapis.com/chromium-...]([commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)Win/LAST_CHANGE) -O-` = `cat prev`)"
exit 1
else
echo "New build (previous: `cat prev`, new: `wget -q [commondatastorage.googleapis.com/chromium-...]([commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)Win/LAST_CHANGE) -O-`)"
fi
echo Downloading [commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)`wget -q [commondatastorage.googleapis.com/chromium-...]([commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)Win/LAST_CHANGE) -O-`/mini_installer.exe
wget [commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)Win/`wget -q [commondatastorage.googleapis.com/chromium-...]([commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)Win/LAST_CHANGE) -O-`/mini_installer.exe
if [[ `ps -W | grep chrome | wc -l` != 0 ]]; then
echo "`ps -W | grep chrome | wc -l` Chrome Processes Running. Attempting to Kill"
for a in `ps -W | grep chrome | awk '{ print $1}'`
do
echo Killing PID $a
/bin/kill -f $a #This is the cygwin kill, not the bash kill
done
else
echo "No Chrome Processes Running"
fiecho "Running installer"
chmod +x ./mini_installer.exe
./mini_installer.exe
echo Done
wget -q [commondatastorage.googleapis.com/chromium-...]([commondatastorage.googleapis.com/chromium-...](http://commondatastorage.googleapis.com/chromium-browser-snapshots/)Win/LAST_CHANGE) -O prev
echo "New build recorded (`cat prev`)"
rm ./mini_installer.exe