Adapt getcompver.awk to Java 9
...where at least <http://jdk.java.net/9/> "JDK 9 Early-Access Builds" 'java -version' outputs a single-digit java version "9" Change-Id: I7807f56593e5436418b49950ca6c2a178d6721f5
This commit is contained in:
@@ -40,8 +40,13 @@ BEGIN {
|
|||||||
/java version/ || /openjdk version/ {
|
/java version/ || /openjdk version/ {
|
||||||
compiler_matched = 1
|
compiler_matched = 1
|
||||||
# match on the format of the java versions ( d[d].d[d].d[d] )
|
# match on the format of the java versions ( d[d].d[d].d[d] )
|
||||||
x = match( $0, /[0-9]*\.[0-9]*\.[0-9]*/ )
|
if (match($0, /[0-9]+\.[0-9]+\.[0-9]+/)) {
|
||||||
CCversion = substr( $0, RSTART, RLENGTH)
|
CCversion = substr($0, RSTART, RLENGTH)
|
||||||
|
} else if (match($0, /[0-9]+\.[0-9]+/)) {
|
||||||
|
CCversion = substr($0, RSTART, RLENGTH) "."
|
||||||
|
} else if (match($0, /[0-9]+/)) {
|
||||||
|
CCversion = substr($0, RSTART, RLENGTH) ".."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/^[0-9]*[.][0-9]*\r*$/ {
|
/^[0-9]*[.][0-9]*\r*$/ {
|
||||||
if ( compiler_matched == 0 ) {
|
if ( compiler_matched == 0 ) {
|
||||||
|
Reference in New Issue
Block a user