#!/bin/bash set +e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) BASE=`realpath $SCRIPT_DIR/..` export WINEPATH=`winepath -w $BASE/ghc/bin/`:`winepath -w $BASE/mingw64/bin/`:`winepath -w $BASE/bin/` export PKG_CONFIG_PATH=`winepath -w $BASE/packages/mingw64/x86_64-w64-mingw32/lib/pkgconfig` wine $BASE/packages/cabal/cabal.exe --http-transport=plain-http $* -w $BASE/packages/ghc/bin/ghc.exe --with-gcc=$BASE/packages/mingw64/bin/gcc.exe