diff --git a/test-ng.sh b/test-ng.sh index 9fc425f..0ba91d5 100755 --- a/test-ng.sh +++ b/test-ng.sh @@ -5,6 +5,16 @@ # stop on first error set -e +rl="readlink -f" +if ! ${rl} "${0}" >/dev/null 2>&1; then + rl="realpath" + + if ! hash ${rl}; then + echo "\"${rl}\" not found!" && exit 1 + fi +fi +cur=`dirname $(${rl} "${0}")` + tmpworkdir="/tmp/dotdrop-tests-workdir" export DOTDROP_WORKDIR="${tmpworkdir}" diff --git a/test-unittest.sh b/test-unittest.sh index 90faa90..bf37316 100755 --- a/test-unittest.sh +++ b/test-unittest.sh @@ -5,6 +5,16 @@ # stop on first error set -e +rl="readlink -f" +if ! ${rl} "${0}" >/dev/null 2>&1; then + rl="realpath" + + if ! hash ${rl}; then + echo "\"${rl}\" not found!" && exit 1 + fi +fi +cur=`dirname $(${rl} "${0}")` + workers=${DOTDROP_WORKERS} if [ ! -z ${workers} ]; then unset DOTDROP_WORKERS