git @ Cat's Eye Technologies Oxcart / master build.sh
master

Tree @master (Download .tar.gz)

build.sh @masterraw · history · blame

#!/bin/sh

PROG=oxcart

if command -v ghc >/dev/null 2>&1; then
    echo "building $PROG.exe with ghc"
    (cd src && ghc --make Main.hs -o ../bin/$PROG.exe)
else
    echo "ghc not found, not building $PROG.exe"
fi

# For this to work, you need hastec installed.

if command -v hastec >/dev/null 2>&1; then
    echo "building $PROG.js with hastec"
    (cd src && hastec --make HasteMain.hs -o $PROG.js && mv $PROG.js ../demo/$PROG.js)
else
    echo "hastec not found, not building $PROG.js"
fi