forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sh
executable file
·80 lines (65 loc) · 1.81 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env bash
usage()
{
echo
echo "There are new changes on how we build. Use this script only for generic"
echo "build instructions that apply for both build native and build managed."
echo "Otherwise:"
echo
echo "Before Now"
echo "build.sh native build-native.sh"
echo "build.sh managed build-managed.sh"
echo
echo "For more information: https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md"
echo "----------------------------------------------------------------------------"
echo
echo
}
if [ "$1" == "-?" ]; then
usage
fi
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
__ServerGC=0
__IsCentos=0
__IsOSX=0
while :; do
if [ $# -le 0 ]; then
break
fi
if [[ $1 == *"centos.7"* ]] ; then
__IsCentos=1
fi
if [[ $1 == *"osx.10"* ]] ; then
__IsOSX=1
fi
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
useservergc)
__ServerGC=1
;;
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
esac
shift
done
export CORECLR_SERVER_GC="$__ServerGC"
"$__scriptpath/build-native.sh" $__UnprocessedBuildArgs
if [ $? -ne 0 ];then
exit 1
fi
if [ $__IsCentos -eq 1 ] ; then
"$__scriptpath/build-packages.sh" -DisableManagedPackage -FilterToOSGroup=rhel.7 $__UnprocessedBuildArgs
elif [ $__IsOSX -eq 1 ] ; then
"$__scriptpath/build-packages.sh" -DisableManagedPackage -FilterToOSGroup=osx.10 $__UnprocessedBuildArgs
else
"$__scriptpath/build-packages.sh" -DisableManagedPackage $__UnprocessedBuildArgs
fi
if [ $? -ne 0 ];then
exit 1
fi
"$__scriptpath/build-managed.sh" $__UnprocessedBuildArgs
if [ $? -ne 0 ];then
exit 1
fi
"$__scriptpath/build-tests.sh" $__UnprocessedBuildArgs
exit $?