Skip to content

Instantly share code, notes, and snippets.

@Rob--W
Created January 23, 2014 12:03
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rob--W/8577499 to your computer and use it in GitHub Desktop.
Save Rob--W/8577499 to your computer and use it in GitHub Desktop.
Download a particular version of Google Chrome from Old Apps
#!/bin/sh
# @author Rob Wu <gwnRob@gmail.com> (https://robwu.nl)
version=$1
if [[ "${version}" != *"."* ]] ; then
echo "Repeat the command with an exact version:"
suffix="[0-9.]*"
# Version not specified in $1
[ -z $version ] && suffix="[0-9][0-9.]+"
curl -s http://www.oldapps.com/google_chrome.php | grep -oP "google_chrome.php\?old_chrome=[0-9]+\">[A-Za-z ]+\K${version}${suffix}( [A-Za-z()]+)?" -m 10
elif [ -e "${version}_chrome_installer.exe" ] ; then
echo "${version}_chrome_installer.exe does already exist!"
else
wget "http://download.oldapps.com/Chrome/${version}_chrome_installer.exe"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment