From 0b60ece4385582068271b1c012c36c5f28c007cd Mon Sep 17 00:00:00 2001 From: rw Date: Fri, 20 Jun 2014 16:51:32 -0700 Subject: [PATCH] show absolute path to user when aborting --- tests/JavaTest.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/JavaTest.sh b/tests/JavaTest.sh index dac280fae..2030dac86 100755 --- a/tests/JavaTest.sh +++ b/tests/JavaTest.sh @@ -18,11 +18,12 @@ LICENSE echo echo Compile then run the Java test. -testdir=$(dirname $0) +testdir=$(readlink -fn `dirname $0`) +thisdir=$(readlink -fn `pwd`) -if [[ "$testdir" != "." ]]; then - echo error: must be run from inside the ./tests directory - echo you ran it from `pwd` +if [[ "$testdir" != "$thisdir" ]]; then + echo error: must be run from inside the ${testdir} directory + echo you ran it from ${thisdir} exit 1 fi