Skip to content

Instantly share code, notes, and snippets.

@lkebin
Last active June 23, 2017 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lkebin/cdefa5cf633af931c4de879d90a0f564 to your computer and use it in GitHub Desktop.
Save lkebin/cdefa5cf633af931c4de879d90a0f564 to your computer and use it in GitHub Desktop.
Script for download standalone Chrome browser
#!/bin/sh
GOOGLE_DL="https://dl.google.com"
WIN_32="/update2/installers/ChromeStandaloneSetup.exe"
WIN_64="/update2/installers/ChromeStandaloneSetup64.exe"
MAC="/chrome/mac/stable/GGRO/googlechrome.dmg"
DL_WIN_DIR=./chrome/windows
DL_MAC_DIR=./chrome/macos
if [[ ! -d $DL_WIN_DIR ]];
then
mkdir -p $DL_WIN_DIR
fi
if [[ ! -d $DL_MAC_DIR ]];
then
mkdir -p $DL_MAC_DIR
fi
function win32()
{
echo "Downloading Chrome for Windows 32bit ..."
curl -# -o "$DL_WIN_DIR/ChromeStandaloneSetup.exe" $GOOGLE_DL$WIN_32
}
function win64()
{
echo "Downloading Chrome for Windows 64bit ..."
curl -# -o "$DL_WIN_DIR/ChromeStandaloneSetup64.exe" $GOOGLE_DL$WIN_64
}
function macos()
{
echo "Downloading Chrome for macOS ..."
curl -# -o "$DL_MAC_DIR/googlechrome.dmg" $GOOGLE_DL$MAC
}
case "$1" in
win64)
win64
;;
win32)
win32
;;
mac|macos)
macos
;;
all|*)
win32
win64
macos
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment