casperjs
312 Bytes
#!/usr/bin/env bash
CASPER_EXECUTABLE=${BASH_SOURCE[0]}
while [ -h "$CASPER_EXECUTABLE" ]; do
CASPER_EXECUTABLE="$( readlink $CASPER_EXECUTABLE )"
done
CASPERJS_HOME="$( cd -PL "$( dirname "$CASPER_EXECUTABLE" )" && cd .. && pwd )"
phantomjs $CASPERJS_HOME/casper.js --casper-path=$CASPERJS_HOME --cli $*