From 4def331b77e449c5d1607dfea4da371584fc559c Mon Sep 17 00:00:00 2001 From: Emmanuel Bourg Date: Thu, 29 Aug 2013 00:33:55 +0200 Subject: [PATCH] Added support for GA releases --- debian/changelog | 1 + lib/oracle-jdk.sh | 18 ++++++++++++------ lib/oracle-jre.sh | 18 ++++++++++++------ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index 778bb8b..c070a82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ java-package (0.53) UNRELEASED; urgency=low * Team upload. * Added support for early access releases (Closes: #721136) + * Added support for GA releases -- Emmanuel Bourg Wed, 28 Aug 2013 19:34:41 +0200 diff --git a/lib/oracle-jdk.sh b/lib/oracle-jdk.sh index 0f42265..944240d 100644 --- a/lib/oracle-jdk.sh +++ b/lib/oracle-jdk.sh @@ -3,14 +3,20 @@ j2se_detect_oracle_j2sdk=oracle_j2sdk_detect oracle_j2sdk_detect() { j2se_release=0 - # Update (jdk-7u15-linux-i586.tar.gz) - if [[ $archive_name =~ jdk-([0-9]+)u([0-9]+)-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] + # Update or GA release (jdk-7u15-linux-i586.tar.gz) + if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} - j2se_update=${BASH_REMATCH[2]} - j2se_arch=${BASH_REMATCH[3]} - j2se_type="Update" - j2se_version=${j2se_release}u${j2se_update} + j2se_update=${BASH_REMATCH[3]} + j2se_arch=${BASH_REMATCH[4]} + if [[ $j2se_update != "" ]] + then + j2se_type="Update" + j2se_version=${j2se_release}u${j2se_update} + else + j2se_type="" + j2se_version=${j2se_release} + fi fi # Early Access Release (jdk-8-ea-bin-b103-linux-i586-15_aug_2013.tar.gz) diff --git a/lib/oracle-jre.sh b/lib/oracle-jre.sh index 7bd2b66..c82dc3d 100644 --- a/lib/oracle-jre.sh +++ b/lib/oracle-jre.sh @@ -3,14 +3,20 @@ j2se_detect_oracle_j2re=oracle_j2re_detect oracle_j2re_detect() { j2se_release=0 - # Update (jre-7u13-linux-x64.tar.gz) - if [[ $archive_name =~ jre-([0-9]+)u([0-9]+)-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] + # Update or GA release (jre-7u13-linux-x64.tar.gz) + if [[ $archive_name =~ jre-([0-9]+)(u([0-9]+))?-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} - j2se_update=${BASH_REMATCH[2]} - j2se_arch=${BASH_REMATCH[3]} - j2se_type="Update" - j2se_version=${j2se_release}u${j2se_update} + j2se_update=${BASH_REMATCH[3]} + j2se_arch=${BASH_REMATCH[4]} + if [[ $j2se_update != "" ]] + then + j2se_type="Update" + j2se_version=${j2se_release}u${j2se_update} + else + j2se_type="" + j2se_version=${j2se_release} + fi fi # Early Access Release (jre-8-ea-bin-b103-linux-x64-15_aug_2013.tar.gz) -- 2.39.5