Skip to content

Instantly share code, notes, and snippets.

@Fedcomp
Created June 28, 2016 14:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fedcomp/0e66301b01238fcc29a46cde116ab11a to your computer and use it in GitHub Desktop.
Save Fedcomp/0e66301b01238fcc29a46cde116ab11a to your computer and use it in GitHub Desktop.
Install fresh phantomjs (linux-x86_64)
#!/usr/bin/env bash
BUILD_REGEX="phantomjs-[0-9\.]+-linux-x86_64"
PHANTOM_VERSION=$(curl -s phantomjs.org/download.html | grep -oE $BUILD_REGEX | head -n 1)
PHANTOM_FILENAME="$PHANTOM_VERSION.tar.bz2"
PHANTOM_URL="https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_FILENAME"
curl -L $PHANTOM_URL | \
tar xjf - -C /usr/local/bin --strip-components 2 $PHANTOM_VERSION/bin/phantomjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment