Skip to content

Instantly share code, notes, and snippets.

@andygock
Created June 4, 2017 13:35
Show Gist options
  • Save andygock/2db46f360421b268dbd997db11490e98 to your computer and use it in GitHub Desktop.
Save andygock/2db46f360421b268dbd997db11490e98 to your computer and use it in GitHub Desktop.
Bash script: Download latest Firefox 32-bit installer for Windows
#!/bin/bash
#
# Download latest Firefox 32-bit installer for Windows
#
url=$(wget -S --max-redirect 0 \
"https://download.mozilla.org/?product=firefox-latest&os=win" 2>&1 \
| grep "^Location" | cut -d ' ' -f 2)
if [ $# -ne 0 ]; then { echo $url; return 0; }; fi
wget "$url" -O "${url##*/}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment