1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-08 03:27:04 +09:00

Move dotnet.cmd/sh helper scripts into the repo root (#672)

* Move dotnet helper scripts to repo root

* Don't swallow InitializeDotNetCli output

* Use temporary file to store sdk location

To avoid a nested process chain in which the inner process then invokes
the host, we instead create a temporary file to store the sdk location.
This commit is contained in:
Viktor Hofer 2019-12-11 21:01:58 +01:00 committed by GitHub
parent 071da4c41a
commit f5957b1bae
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 89 additions and 113 deletions

27
dotnet.sh Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
# 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 $scriptroot/eng/common/tools.sh
InitializeDotNetCli true # Install
__dotnetDir=${_InitializeDotNetCli}
dotnetPath=${__dotnetDir}/dotnet
${dotnetPath} "$@"