-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
44 lines (35 loc) · 817 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
set -eu
cd "$(dirname "$0")"
PAKET_EXE=.paket/paket.exe
FAKE_EXE=packages/build/FAKE/tools/FAKE.exe
FSIARGS=""
FSIARGS2=""
OS=${OS:-"unknown"}
if [ "$OS" != "Windows_NT" ]
then
# Can't use FSIARGS="--fsiargs -d:MONO" in zsh, so split it up
# (Can't use arrays since dash can't handle them)
FSIARGS="--fsiargs"
FSIARGS2="-d:MONO"
fi
run() {
if [ "$OS" != "Windows_NT" ]
then
echo "Running on linux/macs => using Mono"
mono "$@"
else
"$@"
fi
}
echo "Executing Paket..."
FILE='paket.lock'
if [ -f $FILE ]; then
echo "paket.lock file found, restoring packages..."
run $PAKET_EXE restore
else
echo "paket.lock was not found, installing packages..."
run $PAKET_EXE install
fi
echo "Executing FAKE..."
run $FAKE_EXE "$@" $FSIARGS $FSIARGS2 build.fsx