]> git.sven.stormbind.net Git - sven/java-package.git/commitdiff
Added support for early access documentations
authorEmmanuel Bourg <ebourg@apache.org>
Thu, 29 Aug 2013 15:37:15 +0000 (17:37 +0200)
committerEmmanuel Bourg <ebourg@apache.org>
Thu, 29 Aug 2013 15:37:15 +0000 (17:37 +0200)
lib/oracle-jdk-doc.sh

index 3215b26eee2d07eb86d38a47e50917435e1f0d44..e66ea814de4506de35d4622c4b09d13976acce8d 100644 (file)
@@ -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