forked from fsprojects/FSharp.Data.GraphQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·38 lines (32 loc) · 745 Bytes
/
build.sh
File metadata and controls
executable file
·38 lines (32 loc) · 745 Bytes
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
#!/usr/bin/env bash
set -eu
set -o pipefail
# liberated from https://stackoverflow.com/a/18443300/433393
realpath() {
OURPWD=$PWD
cd "$(dirname "$1")"
LINK=$(readlink "$(basename "$1")")
while [ "$LINK" ]; do
cd "$(dirname "$LINK")"
LINK=$(readlink "$(basename "$1")")
done
REALPATH="$PWD/$(basename "$1")"
cd "$OURPWD"
echo "$REALPATH"
}
TOOL_PATH=$(realpath .fake)
PAKET_PATH=$(realpath .paket)
FAKE="$TOOL_PATH"/fake
PAKET_BOOTSTRAPPER_EXE="$PAKET_PATH"/paket.bootstrapper.exe
OS=${OS:-"unknown"}
if [[ "$OS" != "Windows_NT" ]]
then
mono "$PAKET_BOOTSTRAPPER_EXE"
else
"$PAKET_BOOTSTRAPPER_EXE"
fi
if ! [ -e "$FAKE" ]
then
dotnet tool install fake-cli --tool-path "$TOOL_PATH"
fi
"$FAKE" run build.fsx "$@"