From e337d93720d7e87f82402da4ae8ca746f4f4068e Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 2 Sep 2016 14:48:32 -0700 Subject: [PATCH] Install OpenSSL via Homebrew on macOS Since it is required. Note that we do *not* unsafely link the OpenSSL libraries into the system folders, as we instead patch .NET Core's libraries to find OpenSSL in the installed location. --- tools/download.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/download.sh b/tools/download.sh index c3c2c96fb0..4a3cb58f4d 100755 --- a/tools/download.sh +++ b/tools/download.sh @@ -98,6 +98,19 @@ case "$OSTYPE" in esac ;; darwin*) + if hash brew 2>/dev/null; then + if [[ ! -d $(brew --prefix openssl) ]]; then + echo "Installing OpenSSL with brew..." + if ! brew install openssl; then + echo "ERROR: OpenSSL failed to install! Crypto functions will not work..." >&2 + # Don't abort because it is not fatal + fi + fi + else + echo "ERROR: brew not found! OpenSSL may not be available..." >&2 + # Don't abort because it is not fatal + fi + echo "Installing $package with sudo ..." sudo installer -pkg "./$package" -target / ;;