run.sh: pass command-line arguments through to test program
authorBrian Norris <banorris@uci.edu>
Wed, 8 Aug 2012 19:41:02 +0000 (12:41 -0700)
committerBrian Norris <banorris@uci.edu>
Sat, 11 Aug 2012 00:23:52 +0000 (17:23 -0700)
Once the model-checker begins handling arguments, we should pass through
arguments to the program.

run.sh

diff --git a/run.sh b/run.sh
index fecd43d..d4bf030 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -16,13 +16,9 @@ export LD_LIBRARY_PATH=.
 
 [ $# -gt 0 ] && [ "$1" != "gdb" ] && BIN=$1 && shift
 
-if [ $# -gt 0 ]; then
-       if [ "$1" = "gdb" ]; then
-               gdb $BIN
-       else
-               echo "Invalid argument(s)"
-               exit 1
-       fi
-else
-       $BIN
+if [ $# -gt 0 ] && [ "$1" = "gdb" ]; then
+       shift
+       gdb $BIN $@
 fi
+
+$BIN $@