aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2016-10-05 18:41:08 -0500
committerMark Allen <[email protected]>2016-10-05 18:41:08 -0500
commitab5f4324f8442969db899e7d163895b0ebe3e04b (patch)
treedeb4762a0bf5f7c57c76a9320fb8ea044a8a2e3f /kerl
parentdb6a9aaa44cc8e0cfe1a0823c74ddf0388af0c8e (diff)
downloadkerl-ab5f4324f8442969db899e7d163895b0ebe3e04b.tar.gz
kerl-ab5f4324f8442969db899e7d163895b0ebe3e04b.tar.bz2
kerl-ab5f4324f8442969db899e7d163895b0ebe3e04b.zip
Check to see if brew is installed and executable
Diffstat (limited to 'kerl')
-rwxr-xr-xkerl14
1 files changed, 7 insertions, 7 deletions
diff --git a/kerl b/kerl
index 38da876..21d5b5e 100755
--- a/kerl
+++ b/kerl
@@ -515,18 +515,18 @@ _do_build()
echo -n $KERL_CONFIGURE_OPTIONS | grep "ssl" 1>/dev/null 2>&1
# Reminder to self: 0 from grep means the string was detected
if [ $? -ne 0 ]; then
- brew_prefix=$(brew --prefix openssl)
- if [ -n "$brew_prefix" -a -d "$brew_prefix" ]; then
- KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl=$brew_prefix"
+ whichbrew=$(which brew)
+ if [ -n "$whichbrew" -a -x "$whichbrew" ]; then
+ brew_prefix=$(brew --prefix openssl)
+ if [ -n "$brew_prefix" -a -d "$brew_prefix" ]; then
+ KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl=$brew_prefix"
+ fi
elif [ ! -d /usr/include/openssl -o ! -d /usr/local/include/openssl ]; then
# Apple removed OpenSSL from El Capitan, but its still in this
# funky location, so set ssl headers to look here
xc_ssl='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr'
- if [ -d "$xc_ssl/include/openssl" ]
- then
+ if [ -d "$xc_ssl/include/openssl" ]; then
KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl=$xc_ssl"
- else
- echo 'WARNING: No OpenSSL library was found in the usual places. Your Erlang will be built without crypto support!'
fi
unset xc_ssl
fi