From debbced1851e884354d6dbf68982199f85ad2c7c Mon Sep 17 00:00:00 2001 From: Lukas Martini Date: Thu, 7 Apr 2011 19:54:41 +0200 Subject: [PATCH] Fixing scripts to run from both bin/ and /. --- bin/generateJsDoc.sh | 6 +++++- bin/run.sh | 6 +++++- bin/runDebug.sh | 6 +++++- bin/runTests.sh | 8 ++++++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/bin/generateJsDoc.sh b/bin/generateJsDoc.sh index aff696f83..aa62a0d5b 100755 --- a/bin/generateJsDoc.sh +++ b/bin/generateJsDoc.sh @@ -4,7 +4,11 @@ if [ ! -x /usr/bin/java ]; then exit 1 fi -cd "../doc/jsdoc-toolkit" +if [ -d "../bin" ]; then + cd "../" +fi + +cd "doc/jsdoc-toolkit" JSRUN="jsrun.jar" RUNJS="app/run.js" diff --git a/bin/run.sh b/bin/run.sh index e9fbde684..2c42de8e9 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -11,5 +11,9 @@ type -P node &>/dev/null || { exit 1 } -cd ../node +if [ -d "../bin" ]; then + cd "../" +fi + +cd "node" node server.js diff --git a/bin/runDebug.sh b/bin/runDebug.sh index 24630011d..46eec8e8d 100755 --- a/bin/runDebug.sh +++ b/bin/runDebug.sh @@ -11,5 +11,9 @@ node-inspector & echo "If you new to node-inspector, take a look at this video: http://youtu.be/AOnK3NVnxL8" -cd ../node +if [ -d "../bin" ]; then + cd "../" +fi + +cd "node" node --debug server.js diff --git a/bin/runTests.sh b/bin/runTests.sh index 68ebde89a..f22004e37 100755 --- a/bin/runTests.sh +++ b/bin/runTests.sh @@ -6,5 +6,9 @@ type -P nodeunit &>/dev/null || { echo "Run: npm install nodeunit" >&2 exit 1 } - -nodeunit ../tests + +if [ -d "../bin" ]; then + cd "../" +fi + +nodeunit tests