summaryrefslogtreecommitdiff
path: root/init-tools.sh
diff options
context:
space:
mode:
authorSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2018-02-28 12:00:31 -0500
committerSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2018-03-09 14:18:08 -0500
commit70f2256eecbfb950d8dbee1f3f3468b6d8b85da9 (patch)
tree2f5e2befdecb7115c6c6eeca44e2794222e1bcaf /init-tools.sh
parent47d8420b0c687fb8b2d480d7c40434eb01991e73 (diff)
downloadcoreclr-70f2256eecbfb950d8dbee1f3f3468b6d8b85da9.tar.gz
coreclr-70f2256eecbfb950d8dbee1f3f3468b6d8b85da9.tar.bz2
coreclr-70f2256eecbfb950d8dbee1f3f3468b6d8b85da9.zip
Revise init-tools.sh to support bootstrapping
Add $DotNetBootstrapCliTarPath Disable ILAsm nuget fetch while bootstrapping
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/init-tools.sh b/init-tools.sh
index 1df4f25f60..7f39d555d9 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -121,13 +121,18 @@ if [ ! -e $__DOTNET_PATH ]; then
__DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.tar.gz"
install_dotnet_cli() {
- echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> "$__init_tools_log"
- rm -rf -- "$__DOTNET_PATH/*"
- # curl has HTTPS CA trust-issues less often than wget, so lets try that first.
- if command -v curl > /dev/null; then
- curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
+ if [[ "$DotNetBootstrapCliTarPath" = "" ]]; then
+ echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'"
+ rm -rf -- "$__DOTNET_PATH/*"
+ # curl has HTTPS CA trust-issues less often than wget, so lets try that first.
+ if command -v curl > /dev/null; then
+ curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
+ else
+ wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
+ fi
else
- wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
+ echo "Copying '$DotNetBootstrapCliTarPath' to '$__DOTNET_PATH/dotnet.tar'"
+ cp $DotNetBootstrapCliTarPath $__DOTNET_PATH/dotnet.tar
fi
cd $__DOTNET_PATH
tar -xf $__DOTNET_PATH/dotnet.tar
@@ -156,6 +161,11 @@ echo "Using RID $__ILASM_RID for BuildTools native tools"
export ILASMCOMPILER_VERSION=$__ILASM_VERSION
export NATIVE_TOOLS_RID=$__ILASM_RID
+if [ ! "$DotNetBootstrapCliTarPath" = "" ]; then
+ # Assume ilasm is not in nuget yet when bootstrapping...
+ unset ILASMCOMPILER_VERSION
+fi
+
echo "Initializing BuildTools..."
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR $__PACKAGES_DIR" >> $__init_tools_log