Skip to content

Instantly share code, notes, and snippets.

@flomotlik
Last active January 10, 2017 17:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save flomotlik/9525133 to your computer and use it in GitHub Desktop.
Save flomotlik/9525133 to your computer and use it in GitHub Desktop.
Update Firefox version on Codeship
#!/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
@JuanitoFatas
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment