add a todo flag to a comment so it won't get lost... low priority item though
[model-checker.git] / run.sh
1 #!/bin/sh
2 #
3 # Runs a simple test (default: ./test/userprog.o)
4 # Syntax:
5 #  ./run.sh [gdb]
6 #  ./run.sh [test program] [gdb]
7 #
8 # If you include a 'gdb' argument, the your program will be launched with gdb.
9 # You can also supply a test program argument to run something besides the
10 # default program.
11 #
12
13 BIN=./test/userprog.o
14
15 export LD_LIBRARY_PATH=.
16
17 [ $# -gt 0 ] && [ "$1" != "gdb" ] && BIN=$1 && shift
18
19 if [ $# -gt 0 ]; then
20         if [ "$1" = "gdb" ]; then
21                 gdb $BIN
22         else
23                 echo "Invalid argument(s)"
24                 exit 1
25         fi
26 else
27         $BIN
28 fi