diff options
-rwxr-xr-x | kerl | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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" |