git @ Cat's Eye Technologies Quylthulg / rel_1_0_2016_0504 build.sh
rel_1_0_2016_0504

Tree @rel_1_0_2016_0504 (Download .tar.gz)

build.sh @rel_1_0_2016_0504raw · history · blame

#!/bin/sh

PROG=qlzqqlzuup

if [ x`which ghc` = x -a x`which runhugs` = x ]; then
    echo "Neither ghc nor runhugs found on search path."
    exit 1
fi

mkdir -p bin

if [ x`which ghc` = x -o ! x$USE_HUGS = x ]; then
    # create script to run with Hugs
    cat >bin/$PROG <<'EOF'
#!/bin/sh
THIS=`realpath $0`
DIR=`dirname $THIS`/../src
runhugs $DIR/Main.hs $*
EOF
    chmod 755 bin/$PROG
else
    cd src && ghc --make Main.hs -o ../bin/$PROG
fi