diff options
author | Mark Allen <[email protected]> | 2017-02-17 12:05:32 -0600 |
---|---|---|
committer | Mark Allen <[email protected]> | 2017-02-17 12:05:32 -0600 |
commit | 48af4a39796e79c73bcbb9a52d049f094bb2b484 (patch) | |
tree | 9c87660a7d155510c12a9fe61f857cce5e597cd7 | |
parent | 69579330e765ff2a97e75d04ba0a4d0ebedf23d0 (diff) | |
download | kerl-48af4a39796e79c73bcbb9a52d049f094bb2b484.tar.gz kerl-48af4a39796e79c73bcbb9a52d049f094bb2b484.tar.bz2 kerl-48af4a39796e79c73bcbb9a52d049f094bb2b484.zip |
Fix string compare, java detection, version string
-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" |