run.sh: sync up with model-checker improvements
authorBrian Norris <banorris@uci.edu>
Wed, 4 Sep 2013 02:23:45 +0000 (19:23 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 4 Sep 2013 02:25:20 +0000 (19:25 -0700)
run.sh

diff --git a/run.sh b/run.sh
index a14aea3..7f554e7 100755 (executable)
--- a/run.sh
+++ b/run.sh
 # default program.
 #
 
-BIN=./barrier/barrier
+# Get the directory in which this script is located
+BINDIR="${0%/*}"
+
+BIN=${BINDIR}/barrier/barrier
 PREFIX=
 
-export LD_LIBRARY_PATH=..
+export LD_LIBRARY_PATH=${BINDIR}/..
 # For Mac OSX
-export DYLD_LIBRARY_PATH=..
+export DYLD_LIBRARY_PATH=${BINDIR}/..
 
 [ $# -gt 0 ] && [ "$1" = "gdb" ] && PREFIX=gdb && shift
-[ $# -gt 0 ] && [ -x "$1" ] && [ -f "$1" ] && BIN="$1" && shift
+[ $# -gt 0 ] && [ -e "$1" ] && BIN="$1" && shift
 
-set -x
+set -xe
 $PREFIX $BIN $@