Merge branch 'release/3.0' into merge/master-to-release/3.0
[platform/upstream/coreclr.git] / dotnet.sh
1 #!/usr/bin/env bash
2
3 working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4
5 # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
6 export DOTNET_MULTILEVEL_LOOKUP=0
7
8 # Disable first run since we want to control all package sources
9 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
10
11 echo "Running init-tools.sh"
12 source $working_tree_root/init-tools.sh
13
14 dotnet=$working_tree_root/.dotnet/dotnet
15
16 echo "Running: $dotnet $@"
17 $dotnet "$@"
18 if [ $? -ne 0 ]
19 then
20     echo "ERROR: An error occurred in $dotnet $@. Check logs under $working_tree_root."
21     exit 1
22 fi
23
24 echo "Command successfully completed."
25 exit 0