diff options
author | Jose Perez Rodriguez <joperezr@microsoft.com> | 2017-10-10 14:54:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 14:54:18 -0700 |
commit | fc5cb03e64037b611b0741236d3023bb1cc481ce (patch) | |
tree | 478ea2f21bf00bd54c37a21d66ee7a85162d3073 /init-tools.sh | |
parent | 2a2c3e221ce14f4e2b7099b788a8851d10936f02 (diff) | |
download | coreclr-fc5cb03e64037b611b0741236d3023bb1cc481ce.tar.gz coreclr-fc5cb03e64037b611b0741236d3023bb1cc481ce.tar.bz2 coreclr-fc5cb03e64037b611b0741236d3023bb1cc481ce.zip |
Update to 2.0 RTM CLI (#14396)
* Update to 2.0 RTM CLI
* PR feedback
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-x | init-tools.sh | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/init-tools.sh b/init-tools.sh index 1dff622116..f7f5cba790 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -20,11 +20,14 @@ if [ -z "$__DOTNET_PKG" ]; then echo "Error: build not supported on 32 bit Unix" exit 1 fi + + __PKG_ARCH=x64 + OSName=$(uname -s) case $OSName in Darwin) OS=OSX - __DOTNET_PKG=dotnet-dev-osx-x64 + __PKG_RID=osx ulimit -n 2048 # Format x.y.z as single integer with three digits for each part VERSION=`sw_vers -productVersion| sed -e 's/\./ /g' | xargs printf "%03d%03d%03d"` @@ -35,7 +38,7 @@ if [ -z "$__DOTNET_PKG" ]; then ;; Linux) - __DOTNET_PKG=dotnet-dev-linux-x64 + __PKG_RID=linux OS=Linux if [ -e /etc/os-release ]; then @@ -43,24 +46,26 @@ if [ -z "$__DOTNET_PKG" ]; then if [[ $ID == "alpine" ]]; then # remove the last version digit VERSION_ID=${VERSION_ID%.*} - __DOTNET_PKG=dotnet-dev-alpine.$VERSION_ID-x64 + __PKG_RID=alpine.$VERSION_ID fi elif [ -e /etc/redhat-release ]; then redhatRelease=$(</etc/redhat-release) if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then - __DOTNET_PKG=dotnet-dev-rhel.6-x64 + __PKG_RID=rhel.6 fi fi ;; *) - echo "Unsupported OS '$OSName' detected. Downloading linux-x64 tools." + echo "Unsupported OS '$OSName' detected. Downloading linux-$__PKG_ARCH tools." OS=Linux - __DOTNET_PKG=dotnet-dev-linux-x64 + __PKG_RID=linux ;; esac + + __DOTNET_PKG=dotnet-sdk-${__DOTNET_TOOLS_VERSION}-$__PKG_RID-$__PKG_ARCH fi display_error_message() @@ -87,7 +92,7 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then cp -r $DOTNET_TOOL_DIR/* $__DOTNET_PATH else echo "Installing dotnet cli..." - __DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz" + __DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.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 if command -v curl > /dev/null; then |