forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dotnet.sh
executable file
·40 lines (30 loc) · 1.04 KB
/
dotnet.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
#!/usr/bin/env bash
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
__ProjectDir=${working_tree_root}
__RepoRootDir=${working_tree_root}/../..
# BEGIN SECTION to remove after repo consolidation
if [ ! -f "${__RepoRootDir}/.dotnet-runtime-placeholder" ]; then
__RepoRootDir=${__ProjectDir}
fi
# END SECTION to remove after repo consolidation
# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
export DOTNET_MULTILEVEL_LOOKUP=0
# Disable first run since we want to control all package sources
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
source ${__RepoRootDir}/eng/common/tools.sh
InitializeDotNetCli
__dotnetDir=${_InitializeDotNetCli}
if [ $? != 0 ]; then
echo "Failed to install dotnet using Arcade"
exit $?
fi
dotnetPath=${__dotnetDir}/dotnet
echo "Running: ${dotnetPath} $@"
${dotnetPath} "$@"
if [ $? -ne 0 ]
then
echo "ERROR: An error occurred in ${dotnetPath} $@. Check logs under $working_tree_root."
exit 1
fi
echo "Command successfully completed."
exit 0