Skip to content
Snippets Groups Projects
Commit c614bdd3 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

enh(jvm): Fix error message, when checking JAVA version

parent 274f252e
Branches
Tags
No related merge requests found
Pipeline #35083 failed
...@@ -74,6 +74,7 @@ if test -d "${JAVA_HOME}"; then ...@@ -74,6 +74,7 @@ if test -d "${JAVA_HOME}"; then
if test $? -ne 0 || test -z "${JAVA_VERSION}"; then if test $? -ne 0 || test -z "${JAVA_VERSION}"; then
echo "No Java JRE 1.8 found in machine. This is required for Android artifacts." echo "No Java JRE 1.8 found in machine. This is required for Android artifacts."
else else
if ! test "${JAVA_VERSION}" -eq "11"; then
JAVA_MAJOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[1]}') JAVA_MAJOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[1]}')
JAVA_MINOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}') JAVA_MINOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}')
if ! test "${JAVA_MAJOR_VERSION}" -eq "11" || ! test "${JAVA_MINOR_VERSION}" -eq "0"; then if ! test "${JAVA_MAJOR_VERSION}" -eq "11" || ! test "${JAVA_MINOR_VERSION}" -eq "0"; then
...@@ -81,6 +82,7 @@ if test -d "${JAVA_HOME}"; then ...@@ -81,6 +82,7 @@ if test -d "${JAVA_HOME}"; then
fi fi
fi fi
fi fi
fi
# Check Android SDK root path # Check Android SDK root path
if test -z "${ANDROID_SDK_ROOT}" || ! test -d "${ANDROID_SDK_ROOT}"; then if test -z "${ANDROID_SDK_ROOT}" || ! test -d "${ANDROID_SDK_ROOT}"; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment