summaryrefslogtreecommitdiff
path: root/init-tools.sh
diff options
context:
space:
mode:
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/init-tools.sh b/init-tools.sh
index 5b3b70288b..e6966cc2f0 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -85,15 +85,15 @@ if [ ! -e $__PROJECT_JSON_FILE ]; then
if [ ! -e $__DOTNET_PATH ]; then
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
- if hash curl 2>/dev/null; then
- curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL
- echo "curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL"
+ which curl > /dev/null 2> /dev/null
+ if [ $? -ne 0 ]; then
+ mkdir -p "$__DOTNET_PATH"
+ wget -q -O $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL
+ echo "wget -q -O $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL"
else
- mkdir -p "$__DOTNET_PATH"
- wget -q -O $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL
- echo "wget -q -O $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL"
+ curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL
+ echo "curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar $__CLIDownloadURL"
fi
-
cd $__DOTNET_PATH
tar -xf $__DOTNET_PATH/dotnet.tar
if [ -n "$BUILDTOOLS_OVERRIDE_RUNTIME" ]; then