solenv/bin/getcompver.awk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit fde616149d83edba9c77dc2406361da04a8b13a3 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Aug 30 15:16:22 2017 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon May 10 12:04:18 2021 +0200 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 diff --git a/solenv/bin/getcompver.awk b/solenv/bin/getcompver.awk index ae08f4e21790..6744c4dc5c7c 100644 --- a/solenv/bin/getcompver.awk +++ b/solenv/bin/getcompver.awk @@ -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 ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits