X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=run.sh;h=d4bf03000c92d6ab01f39b0e4cd14a17643f091f;hb=2f6c80b075c5da5c6d412955fe8e322d479955dd;hp=9c7af2fb5f4e9bd1283d22975cf6b9c020ae8afe;hpb=8cc80ac1e6bcacda869efce26b2cc58c7b2a6685;p=model-checker.git diff --git a/run.sh b/run.sh index 9c7af2f..d4bf030 100755 --- a/run.sh +++ b/run.sh @@ -1,4 +1,24 @@ #!/bin/sh +# +# Runs a simple test (default: ./test/userprog.o) +# Syntax: +# ./run.sh [gdb] +# ./run.sh [test program] [gdb] +# +# If you include a 'gdb' argument, the your program will be launched with gdb. +# You can also supply a test program argument to run something besides the +# default program. +# + +BIN=./test/userprog.o export LD_LIBRARY_PATH=. -./model + +[ $# -gt 0 ] && [ "$1" != "gdb" ] && BIN=$1 && shift + +if [ $# -gt 0 ] && [ "$1" = "gdb" ]; then + shift + gdb $BIN $@ +fi + +$BIN $@