diff --git a/build.sh b/build.sh index 6bc3032219..a7ff60d4ee 100755 --- a/build.sh +++ b/build.sh @@ -1,20 +1,37 @@ #!/bin/bash - -if [[ ! -e ~/.config/.mono/certs ]]; +if test "$OS" = "Windows_NT" then - mozroots --import --sync --quiet -fi + # use .Net + .paket/paket.bootstrapper.exe + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi -mono .paket/paket.bootstrapper.exe -exit_code=$? -if [ $exit_code -ne 0 ]; then - exit $exit_code -fi + .paket/paket.exe restore + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi -mono .paket/paket.exe restore -exit_code=$? -if [ $exit_code -ne 0 ]; then - exit $exit_code -fi + packages/FAKE/tools/FAKE.exe build.fsx $@ +else + # use mono + if [[ ! -e ~/.config/.mono/certs ]]; then + mozroots --import --sync --quiet + fi + + mono .paket/paket.bootstrapper.exe + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi -mono --runtime=v4.0 packages/FAKE/tools/FAKE.exe build.fsx -d:MONO "$@" \ No newline at end of file + mono .paket/paket.exe restore + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi + + mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx +fi \ No newline at end of file