Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 3beb5e3

Browse files
Merge pull request #127 from pontusmelke/support-jdk10
Fix java version check
2 parents 31a7bef + 0c027c0 commit 3beb5e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cypher-shell/src/dist/cypher-shell

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ check_java() {
1010
[[ -n "${JAVA_MEMORY_OPTS:-}" ]] && version_command+=("${JAVA_MEMORY_OPTS[@]}")
1111

1212
JAVA_VERSION=$("${version_command[@]}" 2>&1 | awk -F '"' '/version/ {print $2}')
13-
if [[ "${JAVA_VERSION}" < "1.8" ]]; then
13+
MAX_VERSION=`echo -e "$JAVA_VERSION\n1.8" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4 -g | tail -1`
14+
if [[ "${MAX_VERSION}" = "1.8" ]]; then
1415
echo "ERROR! Java version ${JAVA_VERSION} is not supported. "
1516
_show_java_help
1617
exit 1

0 commit comments

Comments
 (0)