From eba6ebb9dca571eae2ba5c3ac1666d0c188afb66 Mon Sep 17 00:00:00 2001 From: claur Date: Wed, 29 Jul 2015 11:08:54 +0200 Subject: [PATCH] fix for openjdk8 detection on linux --- openproj_build/resources/projectlibre | 4 ++-- openproj_build/resources/projectlibre.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openproj_build/resources/projectlibre b/openproj_build/resources/projectlibre index d1e30ef..f4694f2 100755 --- a/openproj_build/resources/projectlibre +++ b/openproj_build/resources/projectlibre @@ -113,7 +113,7 @@ check_java() { "$JAVA_EXE" -version > "$VERSION_FILE" 2>&1 || rm -f "$VERSION_FILE" if [ -r "$VERSION_FILE" ]; then - JAVA_VERSION=`cat "$VERSION_FILE" | awk '/^java version/ { print substr($3, 2, length($3)-2); }'` + JAVA_VERSION=`cat "$VERSION_FILE" | awk '/^(java|openjdk) version/ { print substr($3, 2, length($3)-2); }'` if [ "x$OS_NAME" = "xSunOS" ]; then echo " Java version: $JAVA_VERSION \c" else @@ -128,7 +128,7 @@ check_java() { if [ "$JAVA_VERSION" ]; then if [ "$JAVA_VERSION" -ge "$MIN_JAVA_VERSION" ]; then echo "OK" - JAVA_IMPL=`cat "$VERSION_FILE" | awk '/^java version/ { getline; print $1; }'` + JAVA_IMPL=`cat "$VERSION_FILE" | awk '/^(java|openjdk) version/ { getline; print $1; }'` if [ "x$OS_NAME" = "xSunOS" ]; then echo " Java implementation: $JAVA_IMPL \c" else diff --git a/openproj_build/resources/projectlibre.sh b/openproj_build/resources/projectlibre.sh index f23ea90..95e8412 100755 --- a/openproj_build/resources/projectlibre.sh +++ b/openproj_build/resources/projectlibre.sh @@ -113,7 +113,7 @@ check_java() { "$JAVA_EXE" -version > "$VERSION_FILE" 2>&1 || rm -f "$VERSION_FILE" if [ -r "$VERSION_FILE" ]; then - JAVA_VERSION=`cat "$VERSION_FILE" | awk '/^java version/ { print substr($3, 2, length($3)-2); }'` + JAVA_VERSION=`cat "$VERSION_FILE" | awk '/^(java|openjdk) version/ { print substr($3, 2, length($3)-2); }'` if [ "x$OS_NAME" = "xSunOS" ]; then echo " Java version: $JAVA_VERSION \c" else @@ -128,7 +128,7 @@ check_java() { if [ "$JAVA_VERSION" ]; then if [ "$JAVA_VERSION" -ge "$MIN_JAVA_VERSION" ]; then echo "OK" - JAVA_IMPL=`cat "$VERSION_FILE" | awk '/^java version/ { getline; print $1; }'` + JAVA_IMPL=`cat "$VERSION_FILE" | awk '/^(java|openjdk) version/ { getline; print $1; }'` if [ "x$OS_NAME" = "xSunOS" ]; then echo " Java implementation: $JAVA_IMPL \c" else