Last active
January 10, 2017 17:23
-
-
Save flomotlik/9525133 to your computer and use it in GitHub Desktop.
Update Firefox version on Codeship
This file contains 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/bash | |
# Add the following commands to your setup commands to update firefox | |
# git clone https://gist.github.com/9525133.git update_firefox | |
# bash ./update_firefox/update_firefox 28 | |
# firefox --version | |
set -e | |
if [ -z "$1" ]; then | |
echo "Please provide a proper firefox version like 28" | |
exit 1 | |
fi | |
pushd ~/ > /dev/null | |
rm -fr firefox | |
firefox_file=firefox-$1.0.tar.bz2 | |
cache_path=~/cache/$firefox_file | |
download_url=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$1.0/linux-x86_64/en-US/$firefox_file | |
curl -I -f $download_url | |
if [ ! -f $cache_path ]; then | |
wget $download_url -O $cache_path | |
fi | |
tar -jxf $cache_path | |
firefox --version | |
popd > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Googlers, updated script is here: https://github.com/codeship/scripts/blob/master/packages/firefox.sh