From 48af4a39796e79c73bcbb9a52d049f094bb2b484 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Fri, 17 Feb 2017 12:05:32 -0600 Subject: Fix string compare, java detection, version string --- kerl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kerl b/kerl index 98cefb2..4d391cc 100755 --- a/kerl +++ b/kerl @@ -24,7 +24,7 @@ unset ERL_TOP -KERL_VERSION="1.3.4" +KERL_VERSION="1.4.1" #Grep fix for mac pcre errors GREP_OPTIONS='' @@ -411,8 +411,10 @@ assert_perl() get_javac_version() { - java_loc=$(which javac) - if [ -z "$java_loc" ]; then + # http://apple.stackexchange.com/a/135079 + /usr/libexec/java_home >/dev/null 2>&1 + + if [ $? -ne 0 ]; then # Java's not installed, so just return 0 0 else @@ -589,7 +591,7 @@ _do_build() if [ -e "./$KERL_CONFIG_STORAGE_FILENAME.md5" ]; then # Compare our current options to the saved ones OLD_SUM=$(read -r < "./$KERL_CONFIG_STORAGE_FILENAME.md5") - if [ "$SUM" -ne "$OLD_SUM" ]; then + if [ "$SUM" != "$OLD_SUM" ]; then echo "Configure options have changed. Reconfiguring..." rm -f configure mv "$TMPOPT" "./$KERL_CONFIG_STORAGE_FILENAME" -- cgit v1.2.3