added cd back in, since many times the test script wants to access local files, etc.
authorChris Koeritz <fred@gruntose.com>
Thu, 10 May 2012 22:53:33 +0000 (18:53 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 10 May 2012 22:53:33 +0000 (18:53 -0400)
scripts/shunit/example_shunit_test.sh

index c3dc8de5cb6abd72f9883b6becd840e1f42ed30f..cc6c1bb3d2cdf6bfd7dbf645738398c7fc165653 100755 (executable)
@@ -5,12 +5,12 @@
 # Author: Chris Koeritz
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
-#cd $WORKDIR
 if [[ ! "$0" =~ ^/.* ]]; then
-  # re-run the script with the absolute path if it didn't start that way; otherwise
+  # re-run the script with an absolute path if it didn't start out that way; otherwise,
   # shunit is not happy with finding the script.
   exec "$WORKDIR/$(basename $0)" $*
 fi
+cd $WORKDIR
 
 oneTimeSetUp()
 {