Skip to content

Instantly share code, notes, and snippets.

@robzolkos
Created September 30, 2015 04:22
Show Gist options
  • Select an option

  • Save robzolkos/f324c032f80c37c816fe to your computer and use it in GitHub Desktop.

Select an option

Save robzolkos/f324c032f80c37c816fe to your computer and use it in GitHub Desktop.
phantomjs
#!/bin/bash
# Install a custom version 2 of PhantomJS, http://phantomjs.org/
#
# Include in your builds via
# \curl -sSL https://gist.githubusercontent.com/mlocher/f0f731dfa93c82d0fa86/raw/phantomjs2.sh | bash -s
PHANTOMJS_URL="https://s3.amazonaws.com/codeship.io/checkbot/binaries/phantomjs_2.0.1"
CACHED_DOWNLOAD="${HOME}/cache/phantomjs_2.0.1"
# exit on the first error
set -e
# download and symlink version 2.0.1
wget --continue --output-document "${CACHED_DOWNLOAD}" "${PHANTOMJS_URL}"
chmod u+x "${CACHED_DOWNLOAD}"
ln -sf "${CACHED_DOWNLOAD}" "${HOME}/bin/phantomjs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment