Commit 0d498257 0d498257b699d40a13eaca27e1452719dc3ed52a by Nicolas Perriault

fixed issue when casper executable is symlinked

1 parent 8521d467
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 2
3 CASPERJS_HOME="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" 3 CASPER_EXECUTABLE=${BASH_SOURCE[0]}
4
5 if [ -e "$CASPER_EXECUTABLE" ]; then
6 CASPER_EXECUTABLE="$( readlink $CASPER_EXECUTABLE )"
7 fi
8
9 CASPERJS_HOME="$( cd -PL "$( dirname "$CASPER_EXECUTABLE" )" && cd .. && pwd )"
4 10
5 phantomjs $CASPERJS_HOME/casper.js --casper-path=$CASPERJS_HOME $* 11 phantomjs $CASPERJS_HOME/casper.js --casper-path=$CASPERJS_HOME $*
......