- if [ -n "$DOTNET_TOOLSET_DIR" ] && [ -d "$DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION" ]; then
- echo "Copying $DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION to $__DOTNET_PATH" >> $__init_tools_log
- cp -r $DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION/* $__DOTNET_PATH
- elif [ -n "$DOTNET_TOOL_DIR" ] && [ -d "$DOTNET_TOOL_DIR" ]; then
- echo "Copying $DOTNET_TOOL_DIR to $__DOTNET_PATH" >> $__init_tools_log
- 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"
- # 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
- 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
-
- cd $__scriptpath
-
- __PATCH_CLI_NUGET_FRAMEWORKS=1
- fi
+ *)
+ echo "Unsupported OS '$OSName' detected. Downloading linux-$__PKG_ARCH tools."
+ OS=Linux
+ __PKG_RID=linux
+ ;;
+ esac
+ __DOTNET_PKG=dotnet-sdk-${__DOTNET_TOOLS_VERSION}-$__PKG_RID-$__PKG_ARCH