diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-09-01 09:15:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-01 09:15:22 -0700 |
commit | a37ec7adfbf0832c08839751f1ce7bbe5de4de05 (patch) | |
tree | 52b167c5f57587cb84fbb6c9c2d05b554b4fe0aa /init-tools.sh | |
parent | 5952512f68e10241ab1cc31d55dc91f42cf37ac2 (diff) | |
download | coreclr-a37ec7adfbf0832c08839751f1ce7bbe5de4de05.tar.gz coreclr-a37ec7adfbf0832c08839751f1ce7bbe5de4de05.tar.bz2 coreclr-a37ec7adfbf0832c08839751f1ce7bbe5de4de05.zip |
Revert "Avoid using 'which' for verifying prereqs"
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-x | init-tools.sh | 14 |
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 |