Browse Source

Build: unify build.sh and buildn.sh

build.sh now checks the OS and supports Bash on Windows as well.
buildn.sh is therefore no longer needed.
See also fsprojects/ProjectScaffold#76
pull/248/head
Christoph Ruegg 12 years ago
parent
commit
d0d287cc28
  1. 5
      README.md
  2. 12
      build.sh
  3. 5
      buildn.sh
  4. 5
      docs/content/index.fsx

5
README.md

@ -88,9 +88,8 @@ If you do not want to use the official binaries, or if you like to modify, debug
### How to build with FAKE
build.cmd # normal build (.Net 4.0), run unit tests
./build.sh # normal build (.Net 4.0), run unit tests - on Linux or Mac
./buildn.sh # normal build (.Net 4.0), run unit tests - bash on Windows (.Net instead of mono)
build.cmd # normal build (.Net 4.0), run unit tests (.Net on Windows)
./build.sh # normal build (.Net 4.0), run unit tests (Mono on Linux/Mac, .Net on Windows)
build.cmd Build # normal build (.Net 4.0)
build.cmd Build incremental # normal build, incremental (.Net 4.0)

12
build.sh

@ -1,5 +1,11 @@
#!/bin/bash
if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
mono --runtime=v4.0 tools/NuGet/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
if test "$OS" = "Windows_NT"
then
# use .Net
[ ! -f packages/FAKE/tools/FAKE.exe ] && tools/NuGet/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
packages/FAKE/tools/FAKE.exe build.fsx $@
else
# use mono
[ ! -f packages/FAKE/tools/FAKE.exe ] && mono --runtime=v4.0 tools/NuGet/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
mono --runtime=v4.0 packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
fi
mono --runtime=v4.0 packages/FAKE/tools/FAKE.exe build.fsx $@

5
buildn.sh

@ -1,5 +0,0 @@
#!/bin/bash
if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
tools/NuGet/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
fi
packages/FAKE/tools/FAKE.exe build.fsx $@

5
docs/content/index.fsx

@ -216,9 +216,8 @@ If you do not want to use the official binaries, or if you like to modify, debug
### How to build with FAKE
[lang=sh]
build.cmd # normal build (.Net 4.0), run unit tests
./build.sh # normal build (.Net 4.0), run unit tests - on Linux or Mac
./buildn.sh # normal build (.Net 4.0), run unit tests - bash on Windows (.Net instead of mono)
build.cmd # normal build (.Net 4.0), run unit tests (.Net on Windows)
./build.sh # normal build (.Net 4.0), run unit tests (Mono on Linux/Mac, .Net on Windows)
build.cmd Build # normal build (.Net 4.0)
build.cmd Build incremental # normal build, incremental (.Net 4.0)

Loading…
Cancel
Save