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:
parent
5d2e830a30
commit
b44f062df9
@ -40,8 +40,13 @@ BEGIN {
|
||||
/java version/ || /openjdk version/ {
|
||||
compiler_matched = 1
|
||||
# match on the format of the java versions ( d[d].d[d].d[d] )
|
||||
x = match( $0, /[0-9]*\.[0-9]*\.[0-9]*/ )
|
||||
CCversion = substr( $0, RSTART, RLENGTH)
|
||||
if (match($0, /[0-9]+\.[0-9]+\.[0-9]+/)) {
|
||||
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*$/ {
|
||||
if ( compiler_matched == 0 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user