Forgot to add build.sh. Also add .{hg,git}ignore.
Cat's Eye Technologies
10 years ago
0 | #!/bin/sh | |
1 | ||
2 | PROG=flobnar | |
3 | ||
4 | if [ x`which ghc` = x -a x`which runhugs` = x ]; then | |
5 | echo "Neither ghc nor runhugs found on search path." | |
6 | exit 1 | |
7 | fi | |
8 | ||
9 | mkdir -p bin | |
10 | ||
11 | if [ x`which ghc` = x -o ! x$USE_HUGS = x ]; then | |
12 | # create script to run with Hugs | |
13 | cat >bin/$PROG <<'EOF' | |
14 | #!/bin/sh | |
15 | THIS=`realpath $0` | |
16 | DIR=`dirname $THIS`/../src | |
17 | runhugs $DIR/Main.hs $* | |
18 | EOF | |
19 | chmod 755 bin/$PROG | |
20 | else | |
21 | cd src && ghc --make Main.hs -o ../bin/$PROG | |
22 | fi |