From: Emmanuel Bourg Date: Thu, 29 Aug 2013 15:37:15 +0000 (+0200) Subject: Added support for early access documentations X-Git-Url: https://git.sven.stormbind.net/?a=commitdiff_plain;h=5dc7553cf548a350cb1927ed526711b57dc4e235;p=sven%2Fjava-package.git Added support for early access documentations --- diff --git a/lib/oracle-jdk-doc.sh b/lib/oracle-jdk-doc.sh index 3215b26..e66ea81 100644 --- a/lib/oracle-jdk-doc.sh +++ b/lib/oracle-jdk-doc.sh @@ -1,12 +1,40 @@ # Detect product oracle_j2sdk_doc_detect() { + j2se_release=0 - if [[ $archive_name =~ jdk-([0-9]+)u([0-9]+)-apidocs\.zip ]] + # Update or GA release (jdk-7u25-apidocs.zip) + if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-apidocs\.zip ]] then j2se_release=${BASH_REMATCH[1]} - j2se_update=${BASH_REMATCH[2]} - j2se_version=${j2se_release}u${j2se_update} + j2se_update=${BASH_REMATCH[3]} + if [[ $j2se_update != "" ]] + then + j2se_version_name="$j2se_release Update $j2se_update" + j2se_version=${j2se_release}u${j2se_update} + else + j2se_version_name="$j2se_release GA" + j2se_version=${j2se_release} + fi + fi + + # Early Access Release (jdk-8-ea-docs-b104-all-21_aug_2013.zip) + if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-(ea|fcs)-docs-(b[0-9]+)-all.*\.zip ]] + then + j2se_release=${BASH_REMATCH[1]} + j2se_update=${BASH_REMATCH[3]} + j2se_build=${BASH_REMATCH[5]} + if [[ $j2se_update != "" ]] + then + j2se_version_name="$j2se_release Update $j2se_update Early Access Release Build $j2se_build" + j2se_version=${j2se_release}u${j2se_update}~ea-build-${j2se_build} + else + j2se_version_name="$j2se_release Early Access Release Build $j2se_build" + j2se_version=${j2se_release}~ea-build-${j2se_build} + fi + fi + if [[ $j2se_release > 0 ]] + then case "$j2se_release" in 6) # JDK 6 j2se_expected_min_size=44 #Mb @@ -24,7 +52,7 @@ oracle_j2sdk_doc_detect() { Detected product: Java(TM) Development Kit (JDK) Documentation - Standard Edition, Version $j2se_release Update $j2se_update + Standard Edition, Version $j2se_version_name Oracle(TM) EOF if read_yn "Is this correct [Y/n]: "; then