1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-02 18:41:35 +00:00
SixtyPical/build.sh

24 lines
447 B
Bash
Executable File

#!/bin/sh
PROG=sixtypical
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