From 726bc6017f80a2b7064f97bc69dcbd565974f013 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Tue, 19 Apr 2016 21:16:29 -0500 Subject: Rewrite get_newest_valid_release more simply --- kerl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kerl b/kerl index e90ba5e..d1a5702 100755 --- a/kerl +++ b/kerl @@ -219,12 +219,14 @@ get_release_from_name() get_newest_valid_release() { check_releases - while read -r rel; do - if [ ! -z "$rel" ]; then - echo "$rel" - return 0 - fi - done < "$KERL_BASE_DIR"/otp_releases | tail -1 + + rel=$(tail -1 "$KERL_BASE_DIR"/otp_releases) + + if [ ! -z "$rel" ]; then + echo "$rel" + return 0 + fi + return 1 } -- cgit v1.2.3 From f6c5120fabfd7c989380a0b4443651c35a3bf950 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Tue, 19 Apr 2016 21:25:30 -0500 Subject: Go back to just --with-ssl for configure --- kerl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kerl b/kerl index d1a5702..93103db 100755 --- a/kerl +++ b/kerl @@ -367,12 +367,7 @@ do_build() 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 [ $RELVERSION -ge 17 ] - then - KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl --with-ssl-incl=$xc_ssl" - else - KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl=$xc_ssl" - fi + 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 -- cgit v1.2.3 From ef7b54dd8f94dc682d7ad10c88f3c149ca00bfa0 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Tue, 19 Apr 2016 21:27:15 -0500 Subject: If a build fails, tail the logfile automatically --- kerl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kerl b/kerl index 93103db..5b1b8f8 100755 --- a/kerl +++ b/kerl @@ -421,7 +421,10 @@ do_build() fi if [ $? -ne 0 ]; then - echo "Build failed, see $LOGFILE" + echo "Build failed:" + tail $LOGFILE + echo + echo "Please see $LOGFILE for full details." list_remove builds "$1 $2" exit 1 fi -- cgit v1.2.3 From d7aa3341f23464e6cf990877956d00bd0bce2adb Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Wed, 20 Apr 2016 09:48:45 -0500 Subject: Make sure we quote the logfile name --- kerl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kerl b/kerl index 5b1b8f8..4b9833a 100755 --- a/kerl +++ b/kerl @@ -422,7 +422,7 @@ do_build() fi if [ $? -ne 0 ]; then echo "Build failed:" - tail $LOGFILE + tail "$LOGFILE" echo echo "Please see $LOGFILE for full details." list_remove builds "$1 $2" -- cgit v1.2.3