Commit 04416167 04416167d3400446670f327c6eee4b57d16adb31 by Nicolas Perriault

fixes #31 - replaced bash executable script by a Python one

1 parent 87e67426
2011-12-20, v0.4.0 - first numbered version
CasperJS Changelog
==================
2011-12-21, v0.4.1
------------------
- fixed #31 - replaced bash executable script by a Python one
---
2011-12-20, v0.4.0
------------------
- first numbered version
......
#!/usr/bin/env bash
#!/usr/bin/env python
CASPER_EXECUTABLE=${BASH_SOURCE[0]}
import os
import subprocess
import sys
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 $*
def resolve(path):
while os.path.islink(path):
return resolve(os.readlink(path))
return path
CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), '..'))
CASPER_ARGS = ['phantomjs', os.path.join(CASPER_PATH, 'casper.js'), '--casper-path=%s' % CASPER_PATH, '--cli']
CASPER_ARGS.extend(sys.argv[1:])
subprocess.call(CASPER_ARGS)
......
......@@ -33,7 +33,7 @@
phantom.casperVersion = {
major: 0,
minor: 4,
revision: 0,
revision: 1,
toString: function() {
return [this.major, this.minor, this.revision].join('.');
}
......