Created
June 28, 2016 14:30
-
-
Save Fedcomp/0e66301b01238fcc29a46cde116ab11a to your computer and use it in GitHub Desktop.
Install fresh phantomjs (linux-x86_64)
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
#!/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