Commit 04416167 04416167d3400446670f327c6eee4b57d16adb31 by Nicolas Perriault

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

1 parent 87e67426
1 2011-12-20, v0.4.0 - first numbered version 1 CasperJS Changelog
2 ==================
3
4 2011-12-21, v0.4.1
5 ------------------
6
7 - fixed #31 - replaced bash executable script by a Python one
8
9 ---
10
11 2011-12-20, v0.4.0
12 ------------------
13
14 - first numbered version
......
1 #!/usr/bin/env bash 1 #!/usr/bin/env python
2 2
3 CASPER_EXECUTABLE=${BASH_SOURCE[0]} 3 import os
4 import subprocess
5 import sys
4 6
5 while [ -h "$CASPER_EXECUTABLE" ]; do
6 CASPER_EXECUTABLE="$( readlink $CASPER_EXECUTABLE )"
7 done
8 7
9 CASPERJS_HOME="$( cd -PL "$( dirname "$CASPER_EXECUTABLE" )" && cd .. && pwd )" 8 def resolve(path):
10 phantomjs $CASPERJS_HOME/casper.js --casper-path=$CASPERJS_HOME --cli $* 9 while os.path.islink(path):
10 return resolve(os.readlink(path))
11 return path
12
13 CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), '..'))
14 CASPER_ARGS = ['phantomjs', os.path.join(CASPER_PATH, 'casper.js'), '--casper-path=%s' % CASPER_PATH, '--cli']
15 CASPER_ARGS.extend(sys.argv[1:])
16
17 subprocess.call(CASPER_ARGS)
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
33 phantom.casperVersion = { 33 phantom.casperVersion = {
34 major: 0, 34 major: 0,
35 minor: 4, 35 minor: 4,
36 revision: 0, 36 revision: 1,
37 toString: function() { 37 toString: function() {
38 return [this.major, this.minor, this.revision].join('.'); 38 return [this.major, this.minor, this.revision].join('.');
39 } 39 }
......