Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-02-25 02:36:08 +0300
committerGitHub <noreply@github.com>2017-02-25 02:36:08 +0300
commit83afd158b908115ab509b3bd7b6436b952bd5e2f (patch)
tree8b7ae31b57f79e12a3c9dbdb2b0931b9efafc4f8 /init-tools.sh
parent2930417fd21d3e4c24483eed169b9794a13cbad3 (diff)
Update build tools to latest (#2815)
* Update BuildToolsVersion to latest * Cleanup CLSCompliant warnings * Delete workaround that is no longer needed * Download .NET Core 1.1 * Fix Roslyn props * MSBuild.exe was renamed to MSBuild.dll * Fix CoreCLR tests * Rename netcoreapp12 -> netcoreapp20 * Fix UnitTests runs * Fix RemoveEmptyFinalizers CodeAnalysis warnings * Port init-tools.sh cleanup from CoreCLR
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh26
1 files changed, 20 insertions, 6 deletions
diff --git a/init-tools.sh b/init-tools.sh
index 1e07740cb..eb777c084 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-__scriptpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
__init_tools_log=$__scriptpath/init-tools.log
__PACKAGES_DIR=$__scriptpath/packages
__TOOLRUNTIME_DIR=$__scriptpath/Tools
@@ -70,11 +70,13 @@ OSName=$(uname -s)
Darwin)
OS=OSX
__DOTNET_PKG=dotnet-dev-osx-x64
+ __NETCORE11_PKG=dotnet-osx-x64
ulimit -n 2048
;;
Linux)
__DOTNET_PKG="dotnet-dev-$(get_current_linux_name)-x64"
+ __NETCORE11_PKG="dotnet-$(get_current_linux_name)-x64"
OS=Linux
;;
@@ -82,6 +84,7 @@ OSName=$(uname -s)
echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools."
OS=Linux
__DOTNET_PKG=dotnet-dev-ubuntu-x64
+ __NETCORE11_PKG=dotnet-ubuntu-x64
;;
esac
fi
@@ -89,20 +92,31 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi
echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log
if [ ! -e $__DOTNET_PATH ]; then
+
+ mkdir -p "$__DOTNET_PATH"
+
echo "Installing dotnet cli..."
__DOTNET_LOCATION="https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz"
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log
- which curl > /dev/null 2> /dev/null
- if [ $? -ne 0 ]; then
- mkdir -p "$__DOTNET_PATH"
- wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
- else
+ 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
cd $__DOTNET_PATH
tar -xf $__DOTNET_PATH/dotnet.tar
+ # Install .NET Core 1.1 until we get CLI updated to a version that has it bundled in
+ echo "Installing .NETCore 1.1..."
+ __NETCORE11_LOCATION="https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/1.1.0/${__NETCORE11_PKG}.1.1.0.tar.gz"
+ if command -v curl > /dev/null; then
+ curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/netcore11.tar ${__NETCORE11_LOCATION}
+ else
+ wget -q -O $__DOTNET_PATH/netcore11.tar ${__NETCORE11_LOCATION}
+ fi
+ tar -xf $__DOTNET_PATH/netcore11.tar
+
cd $__scriptpath
fi