forked from nblockchain/fsx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.sh
executable file
·63 lines (53 loc) · 1.19 KB
/
configure.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
set -e
if ! which make >/dev/null 2>&1; then
echo "checking for make... not found"
exit 1
else
echo "checking for make... found"
fi
if ! which fsharpc >/dev/null 2>&1; then
echo "checking for F# compiler... not found"
exit 1
else
echo "checking for F# compiler... found"
fi
BUILDTOOL=invalid
if ! which msbuild >/dev/null 2>&1; then
echo "checking for msbuild... not found"
if ! which xbuild >/dev/null 2>&1; then
echo "checking for xbuild... not found"
exit 1
else
echo "checking for xbuild... found"
BUILDTOOL=xbuild
fi
else
echo "checking for msbuild... found"
BUILDTOOL=msbuild
fi
DESCRIPTION="tarball"
if which git >/dev/null 2>&1; then
# https://stackoverflow.com/a/12142066/1623521
DESCRIPTION=`git rev-parse --abbrev-ref HEAD`
fi
#default:
PREFIX=/usr/local
for i in "$@"
do
case $i in
-p=*|--prefix=*)
PREFIX="${i#*=}"
;;
*)
# unknown option
;;
esac
done
source version.config
echo -e "BuildTool=$BUILDTOOL\nPrefix=$PREFIX" > build.config
echo
echo -e "\tConfiguration summary for fsx $Version ($DESCRIPTION)"
echo
echo -e "\t* Installation prefix: $PREFIX"
echo