Support FORCE_HUGS.
Chris Pressey
5 years ago
3 | 3 | DIR=`dirname $THIS` |
4 | 4 | NAME=`basename $THIS` |
5 | 5 | SRC=$DIR/../src |
6 | if [ -x $DIR/$NAME.exe ] ; then | |
6 | if [ "x$FORCE_HUGS" != "x" ] ; then | |
7 | exec runhugs -i$SRC $SRC/Main.hs $* | |
8 | elif [ -x $DIR/$NAME.exe ] ; then | |
7 | 9 | exec $DIR/$NAME.exe $* |
8 | 10 | elif command -v runhaskell 2>&1 >/dev/null ; then |
9 | 11 | exec runhaskell -i$SRC $SRC/Main.hs $* |
10 | 12 | elif command -v runhugs 2>&1 >/dev/null ; then |
11 | 13 | exec runhugs -i$SRC $SRC/Main.hs $* |
12 | 14 | else |
13 | echo "Cannot run $NAME; neither $NAME.exe, runhaskell, nor runhugs found." | |
15 | echo "Cannot run $NAME; neither $NAME.exe, nor runhaskell, nor runhugs found." | |
14 | 16 | exit 1 |
15 | 17 | fi |