summaryrefslogtreecommitdiff
path: root/init-tools.sh
diff options
context:
space:
mode:
authorJürgen Hötzel <juergen@hoetzel.info>2017-01-06 01:15:49 +0100
committerJan Vorlicek <janvorli@microsoft.com>2017-01-06 01:15:49 +0100
commit7f8557fb17c58a093bf54bd17e965b9181bba772 (patch)
tree95b32f51004af7006b1ce7105187f1821e578fcb /init-tools.sh
parent1ba20a12ef18140d0ee1867fe5b0c0106bdbaf57 (diff)
downloadcoreclr-7f8557fb17c58a093bf54bd17e965b9181bba772.tar.gz
coreclr-7f8557fb17c58a093bf54bd17e965b9181bba772.tar.bz2
coreclr-7f8557fb17c58a093bf54bd17e965b9181bba772.zip
Use POSIX "command" instead of non-standard "which" (#8823)
GNU which might not be installed on a minimal GNU/Linux installation. Refs #6994 and #7025.
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/init-tools.sh b/init-tools.sh
index cc8a5d8600..d4183adf22 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -110,8 +110,7 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
__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
+ if command -v curl > /dev/null; then
wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
else
curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}