run.sh: provide gdb option
authorBrian Norris <banorris@uci.edu>
Mon, 21 May 2012 17:32:05 +0000 (10:32 -0700)
committerBrian Norris <banorris@uci.edu>
Mon, 21 May 2012 17:32:05 +0000 (10:32 -0700)
run.sh

diff --git a/run.sh b/run.sh
index 8eaeb3d..7ef8e9b 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -1,3 +1,13 @@
 #!/bin/sh
 export LD_LIBRARY_PATH=.
-./model
+
+if [ $# -gt 0 ]; then
+       if [ "$1" = "gdb" ]; then
+               gdb ./model
+       else
+               echo "Invalid argument(s)"
+               exit 1
+       fi
+else
+       ./model
+fi