From: Wonyoung Choi Date: Thu, 30 Jul 2020 00:14:28 +0000 (+0900) Subject: Replace source path to absolute in case of 'dotnet restore' X-Git-Tag: submit/tizen/20200730.012825^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad98d0b94d273a37fc276f77beff5031a9561ec9;p=platform%2Fcore%2Fdotnet%2Fbuild-tools.git Replace source path to absolute in case of 'dotnet restore' Change-Id: I3c7140a6f194ba34a4b30eedb8476ed4e9d6c943 --- diff --git a/tools/dotnet-wrapper.sh b/tools/dotnet-wrapper.sh index 701cf074..0b732382 100755 --- a/tools/dotnet-wrapper.sh +++ b/tools/dotnet-wrapper.sh @@ -7,10 +7,26 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true export DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 export MSBUILDDISABLENODEREUSE=true -if [ "$1" == "msbuild" -o "$1" == "build" -o "$1" == "restore" ]; then - echo $DOTNET_CLI_PATH "$@" /nodeReuse:false /p:UseRazorBuildServer=false /p:UseSharedCompilation=false - $DOTNET_CLI_PATH "$@" /nodeReuse:false /p:UseRazorBuildServer=false /p:UseSharedCompilation=false +if [ "$1" == "msbuild" ]; then + ARGS="$@ /nodeReuse:false /p:UseSharedCompilation=false" +elif [ "$1" == "restore" ]; then + while [[ $# -gt 0 ]]; do + x="$1" + if [ $x == "-s" ] || [ $x == "--source" ]; then + ARGS+=" $x $(readlink -m $2)" + shift + elif [[ $x =~ --source=(.+) ]]; then + ARGS+=" --source=$(readlink -m ${BASH_REMATCH[1]})" + else + ARGS+=" $x" + fi + shift + done +elif [ "$1" == "build" ]; then + ARGS="$@ /p:UseSharedCompilation=false" else - echo $DOTNET_CLI_PATH "$@" - $DOTNET_CLI_PATH "$@" + ARGS="$@" fi + +echo $DOTNET_CLI_PATH $ARGS +$DOTNET_CLI_PATH $ARGS