Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build.sh - github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 408744b4fc6e63370b349f582c6e97d7aa2f4286 (plain)
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
#!/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" == "-?" ] || [ "$1" == "-h" ]; then
    usage
    if [ "$1" == "-h" ]; then
        set -- "-?"
    fi
fi

__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
__workingDir=$(pwd -P)

if [ "$1" != "" ] && [[ "$1" != -* ]]; then
    if [ -d $__workingDir/$1 ]; then
        $__scriptpath/run.sh build-directory -directory:$__workingDir/$*
        exit $?
    fi
    if [ -d $__scriptpath/src/$1 ]; then
        $__scriptpath/run.sh build-directory -directory:$__scriptpath/$*
        exit $?
    fi
fi

"$__scriptpath/build-native.sh" "$@"
if [ $? -ne 0 ];then
   exit 1
fi

"$__scriptpath/build-managed.sh" -BuildPackages=true "$@"
exit $?