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")"
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"
13 scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
15 # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
16 export DOTNET_MULTILEVEL_LOOKUP=0
18 # Disable first run since we want to control all package sources
19 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
21 source $scriptroot/eng/common/tools.sh
23 InitializeDotNetCli true # Install
24 __dotnetDir=${_InitializeDotNetCli}
26 dotnetPath=${__dotnetDir}/dotnet