a readlink alternative in bash test script

This commit is contained in:
Sébastien Moratinos 2014-01-05 20:09:58 +01:00
parent be40fc337e
commit e8e8b4bb66
3 changed files with 10 additions and 19 deletions

View file

@ -1,13 +1,10 @@
#!/bin/bash
# full script path include his name
_script="$(readlink -f ${BASH_SOURCE[0]})"
# Script location path (dir)
_base="$(dirname $_script)"
# full script path
_scriptDir="$(cd "$(dirname "$0")" && pwd -P)"
sleep 5
cd $_base
cd $_scriptDir
cd ../
until node_modules/karma/bin/karma start; do
echo "Karma crashed with exit code $?. Respawning.." >&2

View file

@ -1,11 +1,8 @@
#!/bin/bash
# full script path include his name
_script="$(readlink -f ${BASH_SOURCE[0]})"
# Script location path (dir)
_base="$(dirname $_script)"
cd $_base
# full script path
_scriptDir="$(cd "$(dirname "$0")" && pwd -P)"
cd $_scriptDir
cd ../
node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --autotest --captureExceptions

View file

@ -1,11 +1,8 @@
#!/bin/bash
# full script path include his name
_script="$(readlink -f ${BASH_SOURCE[0]})"
# Script location path (dir)
_base="$(dirname $_script)"
# full script path
_scriptDir="$(cd "$(dirname "$0")" && pwd -P)"
cd $_base
cd $_scriptDir
cd ../
node_modules/.bin/nodemon . --ext ".coffee|.js" --watch server --watch server.coffee --unittest