You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by il...@apache.org on 2019/10/01 16:53:35 UTC
[ignite] branch master updated: IGNITE-9836 Java version check can
now deal with letter suffixes - Fixes #6920.
This is an automated email from the ASF dual-hosted git repository.
ilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 61e7ffc IGNITE-9836 Java version check can now deal with letter suffixes - Fixes #6920.
61e7ffc is described below
commit 61e7ffcef78aad2724a9fbd581a9d6059d5209e5
Author: Stephen Darlington <st...@gridgain.com>
AuthorDate: Tue Oct 1 19:40:48 2019 +0300
IGNITE-9836 Java version check can now deal with letter suffixes - Fixes #6920.
Signed-off-by: Ilya Kasnacheev <il...@gmail.com>
---
bin/include/functions.sh | 7 +------
modules/web-console/web-agent/bin/include/functions.sh | 7 +------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/bin/include/functions.sh b/bin/include/functions.sh
index 199fd4e..44fab12 100755
--- a/bin/include/functions.sh
+++ b/bin/include/functions.sh
@@ -46,12 +46,7 @@ javaMajorVersion() {
if [ ${version} -eq 1 ]; then
# Version seems starts from 1, we need second number.
javaVersion "$1"
- backIFS=$IFS
-
- IFS=. ver=(${version##*-})
- version=${ver[1]}
-
- IFS=$backIFS
+ version=$(awk -F[\"\.] '{print $2}' <<< ${version})
fi
}
diff --git a/modules/web-console/web-agent/bin/include/functions.sh b/modules/web-console/web-agent/bin/include/functions.sh
index eb5bd65..74f6d24 100644
--- a/modules/web-console/web-agent/bin/include/functions.sh
+++ b/modules/web-console/web-agent/bin/include/functions.sh
@@ -40,12 +40,7 @@ javaMajorVersion() {
if [ ${version} -eq 1 ]; then
# Version seems starts from 1, we need second number.
javaVersion "$1"
- backIFS=$IFS
-
- IFS=. ver=(${version##*-})
- version=${ver[1]}
-
- IFS=$backIFS
+ version=$(awk -F[\"\.] '{print $2}' <<< ${version})
fi
}