Skip to content

Instantly share code, notes, and snippets.

@Pintouch
Created March 24, 2016 14:21
Show Gist options
  • Save Pintouch/8fd583314bc681ac3daa to your computer and use it in GitHub Desktop.
Save Pintouch/8fd583314bc681ac3daa to your computer and use it in GitHub Desktop.
nvm install 5.6.0
npm uninstall phantomjs
npm cache clean -f
rm -rf node_modules
#Install PhantomJs
PHANTOMJS_VERSION=${PHANTOMJS_VERSION:="2.1.1"}
PHANTOMJS_HOST=${PHANTOMJS_HOST:="https://bitbucket.org/ariya/phantomjs/downloads"}
set -e
CACHED_DOWNLOAD="${HOME}/cache/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2"
# clean old version and setup directories
rm -rf ~/.phantomjs
mkdir ~/.phantomjs
wget --continue --output-document "${CACHED_DOWNLOAD}" "${PHANTOMJS_HOST}/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2"
tar -xaf "${CACHED_DOWNLOAD}" --strip-components=1 --directory "${HOME}/.phantomjs"
phantomjs --version
#END PhantomJS
npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment