[Tizen] separate PIC and PIE to fix x86_64 build error
[platform/upstream/dotnet/runtime.git] / dotnet.sh
1 #!/usr/bin/env bash
2
3 source="${BASH_SOURCE[0]}"
4 # resolve $SOURCE until the file is no longer a symlink
5 while [[ -h $source ]]; do
6   scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
7   source="$(readlink "$source")"
8
9   # if $source was a relative symlink, we need to resolve it relative to the path where the
10   # symlink file was located
11   [[ $source != /* ]] && source="$scriptroot/$source"
12 done
13 scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
14
15 # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
16 export DOTNET_MULTILEVEL_LOOKUP=0
17
18 # Disable first run since we want to control all package sources
19 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
20
21 source $scriptroot/eng/common/tools.sh
22
23 InitializeDotNetCli true # Install
24 __dotnetDir=${_InitializeDotNetCli}
25
26 dotnetPath=${__dotnetDir}/dotnet
27 ${dotnetPath} "$@"