projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4f0f0db
)
run.sh: support running from a different directory
author
Brian Norris
<banorris@uci.edu>
Wed, 4 Sep 2013 02:03:44 +0000
(19:03 -0700)
committer
Brian Norris
<banorris@uci.edu>
Wed, 4 Sep 2013 02:15:30 +0000
(19:15 -0700)
run.sh
patch
|
blob
|
history
diff --git
a/run.sh
b/run.sh
index b611406ef656374fefbe8a62955435b745e67d4e..0807b2ec4a4557a05691c0f6a3315571f4b2681b 100755
(executable)
--- a/
run.sh
+++ b/
run.sh
@@
-11,12
+11,15
@@
# default program.
#
# default program.
#
-BIN=./test/userprog.o
+# Get the directory in which this script and the binaries are located
+BINDIR="${0%/*}"
+
+BIN=${BINDIR}/test/userprog.o
PREFIX=
PREFIX=
-export LD_LIBRARY_PATH=
.
+export LD_LIBRARY_PATH=
${BINDIR}
# For Mac OSX
# For Mac OSX
-export DYLD_LIBRARY_PATH=
.
+export DYLD_LIBRARY_PATH=
${BINDIR}
[ $# -gt 0 ] && [ "$1" = "gdb" ] && PREFIX=gdb && shift
[ $# -gt 0 ] && [ -e "$1" ] && BIN="$1" && shift
[ $# -gt 0 ] && [ "$1" = "gdb" ] && PREFIX=gdb && shift
[ $# -gt 0 ] && [ -e "$1" ] && BIN="$1" && shift