mirror of
https://git.code.sf.net/p/projectlibre/code
synced 2024-11-01 03:21:46 +01:00
fix for openjdk8 detection on linux
This commit is contained in:
parent
8a4d2d0d70
commit
eba6ebb9dc
2 changed files with 4 additions and 4 deletions
|
@ -113,7 +113,7 @@ check_java() {
|
||||||
"$JAVA_EXE" -version > "$VERSION_FILE" 2>&1 || rm -f "$VERSION_FILE"
|
"$JAVA_EXE" -version > "$VERSION_FILE" 2>&1 || rm -f "$VERSION_FILE"
|
||||||
|
|
||||||
if [ -r "$VERSION_FILE" ]; then
|
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
|
if [ "x$OS_NAME" = "xSunOS" ]; then
|
||||||
echo " Java version: $JAVA_VERSION \c"
|
echo " Java version: $JAVA_VERSION \c"
|
||||||
else
|
else
|
||||||
|
@ -128,7 +128,7 @@ check_java() {
|
||||||
if [ "$JAVA_VERSION" ]; then
|
if [ "$JAVA_VERSION" ]; then
|
||||||
if [ "$JAVA_VERSION" -ge "$MIN_JAVA_VERSION" ]; then
|
if [ "$JAVA_VERSION" -ge "$MIN_JAVA_VERSION" ]; then
|
||||||
echo "OK"
|
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
|
if [ "x$OS_NAME" = "xSunOS" ]; then
|
||||||
echo " Java implementation: $JAVA_IMPL \c"
|
echo " Java implementation: $JAVA_IMPL \c"
|
||||||
else
|
else
|
||||||
|
|
|
@ -113,7 +113,7 @@ check_java() {
|
||||||
"$JAVA_EXE" -version > "$VERSION_FILE" 2>&1 || rm -f "$VERSION_FILE"
|
"$JAVA_EXE" -version > "$VERSION_FILE" 2>&1 || rm -f "$VERSION_FILE"
|
||||||
|
|
||||||
if [ -r "$VERSION_FILE" ]; then
|
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
|
if [ "x$OS_NAME" = "xSunOS" ]; then
|
||||||
echo " Java version: $JAVA_VERSION \c"
|
echo " Java version: $JAVA_VERSION \c"
|
||||||
else
|
else
|
||||||
|
@ -128,7 +128,7 @@ check_java() {
|
||||||
if [ "$JAVA_VERSION" ]; then
|
if [ "$JAVA_VERSION" ]; then
|
||||||
if [ "$JAVA_VERSION" -ge "$MIN_JAVA_VERSION" ]; then
|
if [ "$JAVA_VERSION" -ge "$MIN_JAVA_VERSION" ]; then
|
||||||
echo "OK"
|
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
|
if [ "x$OS_NAME" = "xSunOS" ]; then
|
||||||
echo " Java implementation: $JAVA_IMPL \c"
|
echo " Java implementation: $JAVA_IMPL \c"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue