@@ -25,19 +25,21 @@ while :; do
2525 lowerI=" $( echo $1 | awk ' {print tolower($0)}' ) "
2626 case $lowerI in
2727 --with-ref-packages)
28- CUSTOM_REF_PACKAGES_DIR=" $2 "
28+ CUSTOM_REF_PACKAGES_DIR=" $( cd -P " $2 " && pwd ) "
2929 if [ ! -d " $CUSTOM_REF_PACKAGES_DIR " ]; then
3030 echo " Custom reference packages directory '$CUSTOM_REF_PACKAGES_DIR ' does not exist"
3131 exit 1
3232 fi
33+ MSBUILD_ARGUMENTS+=( " /p:CustomReferencePackagesPath=$CUSTOM_REF_PACKAGES_DIR " )
3334 shift
3435 ;;
3536 --with-packages)
36- CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR=" $2 "
37+ CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR=" $( cd -P " $2 " && pwd ) "
3738 if [ ! -d " $CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR " ]; then
3839 echo " Custom prviously built packages directory '$CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR ' does not exist"
3940 exit 1
4041 fi
42+ MSBUILD_ARGUMENTS+=( " /p:CustomPrebuiltSourceBuiltPackagesPath=$CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR " )
4143 shift
4244 ;;
4345 --)
@@ -55,6 +57,8 @@ while :; do
5557 exit 1
5658 ;;
5759 esac
60+ shift
61+ done
5862
5963sdkLine=` grep -m 1 ' dotnet' " $SCRIPT_ROOT /global.json" `
6064sdkPattern=" \" dotnet\" *: *\" (.*)\" "
@@ -83,19 +87,19 @@ if [ ! -f "$packageVersionsPath" ]; then
8387 exit 1
8488fi
8589
86- arcadeSdkLine=` grep -m 1 ' MicrosoftDotNetArcadeSdkVersion' " $packageVersionsPath "
90+ arcadeSdkLine=` grep -m 1 ' MicrosoftDotNetArcadeSdkVersion' " $packageVersionsPath " `
8791versionPattern=" <MicrosoftDotNetArcadeSdkVersion>(.*)</MicrosoftDotNetArcadeSdkVersion>"
8892if [[ $arcadeSdkLine =~ $versionPattern ]]; then
8993 export ARCADE_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
9094fi
9195
92- sourceLinkLine=` grep -m 1 ' MicrosoftSourceLinkCommonVersion' " $packageVersionsPath "
96+ sourceLinkLine=` grep -m 1 ' MicrosoftSourceLinkCommonVersion' " $packageVersionsPath " `
9397versionPattern=" <MicrosoftSourceLinkCommonVersion>(.*)</MicrosoftSourceLinkCommonVersion>"
9498if [[ $sourceLinkLine =~ $versionPattern ]]; then
9599 export SOURCE_LINK_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
96100fi
97101
98- dotNetHostLine=` grep -m 1 ' MicrosoftNETCoreDotNetHostVersion' " $packageVersionsPath "
102+ dotNetHostLine=` grep -m 1 ' MicrosoftNETCoreDotNetHostVersion' " $packageVersionsPath " `
99103versionPattern=" <MicrosoftNETCoreDotNetHostVersion>(.*)</MicrosoftNETCoreDotNetHostVersion>"
100104if [[ $dotNetHostLine =~ $versionPattern ]]; then
101105 export DOTNET_HOST_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
@@ -108,7 +112,6 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1
108112export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
109113export NUGET_PACKAGES=" $SCRIPT_ROOT /packages/restored/"
110114
111-
112115$CLI_ROOT /dotnet $CLI_ROOT /sdk/$SDK_VERSION /MSBuild.dll /bl:BuildXPlatTasks.binlog $SCRIPT_ROOT /tools-local/init-build.proj /t:BuildXPlatTasks ${MSBUILD_ARGUMENTS[@]} " $@ "
113116
114117echo " Rebuild reference assemblies"
0 commit comments