Created
January 23, 2014 12:03
-
-
Save Rob--W/8577499 to your computer and use it in GitHub Desktop.
Download a particular version of Google Chrome from Old Apps
This file contains hidden or 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 | |
# @author Rob Wu <[email protected]> (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