]> git.sven.stormbind.net Git - sven/java-package.git/commitdiff
adjust binary path within the JDK for java and friends
authorSven Hoexter <sven@stormbind.net>
Sun, 26 Nov 2017 12:11:24 +0000 (13:11 +0100)
committerSven Hoexter <sven@stormbind.net>
Sun, 26 Nov 2017 12:11:24 +0000 (13:11 +0100)
In the past we had <your-jdk>/jre/bin now we've just
<your-jdk>/bin. Adjust all some functions to use
a newly introduced variable $j2se_binary_subdir which
carries the old diretory "/jre/bin" as default if
undefined. Defined for JDK 9 as just "/bin".

lib/oracle-jdk.sh

index 20a16c7ae3f53c6b19504fc37d40373addaca23e..2c25e255ddd74156ae71b3040104119140ff7856 100644 (file)
@@ -12,6 +12,7 @@ oracle_j2sdk_detect() {
       j2se_version_name="${j2se_release} version ${j2se_release}${j2se_update}" 
       j2se_version=${j2se_release}${j2se_update}${revision}
       j2se_expected_min_size=340 #Mb
+      j2se_binary_subdir="/bin"
   fi
 
   # Update or GA release (jdk-7u15-linux-i586.tar.gz)
@@ -118,6 +119,7 @@ EOF
       oracle_jre_lib_hl="jexec"
       oracle_bin_jdk="appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jcmd jconsole jdb jdeps jhat jinfo jmap jmc jps jrunscript jsadebugd jstack jstat jstatd jvisualvm native2ascii rmic schemagen serialver wsgen wsimport xjc"
       j2se_package="$j2se_vendor-java$j2se_release-jdk"
+      j2se_binary_subdir="${j2se_binary_subdir:-/jre/bin}"
       j2se_run
     fi
   fi
@@ -129,10 +131,10 @@ if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
     exit 0
 fi
 
-install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl
-install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre
+install_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_hl
+install_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_jre
 if [ -n "$oracle_no_man_jre_bin_jre" ]; then
-    install_no_man_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre
+    install_no_man_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_no_man_jre_bin_jre
 fi
 install_no_man_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
 install_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
@@ -153,10 +155,10 @@ if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
     exit 0
 fi
 
-remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl
-remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre
+remove_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_hl
+remove_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_jre
 if [ -n "$oracle_no_man_jre_bin_jre" ]; then
-    remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre
+    remove_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_no_man_jre_bin_jre
 fi
 remove_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
 remove_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
@@ -177,10 +179,10 @@ name=$j2se_name
 priority=${priority_override:-$j2se_priority}
 section=main
 EOF
-    jinfos "hl" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_hl
-    jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_jre
+    jinfos "hl" $jvm_base$j2se_name${j2se_binary_subdir}/ $oracle_jre_bin_hl
+    jinfos "jre" $jvm_base$j2se_name${j2se_binary_subdir}/ $oracle_jre_bin_jre
     if [ -n "$oracle_no_man_jre_bin_jre" ]; then
-        jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_no_man_jre_bin_jre
+        jinfos "jre" $jvm_base$j2se_name${j2se_binary_subdir}/ $oracle_no_man_jre_bin_jre
     fi
     jinfos "hl" $jvm_base$j2se_name/jre/lib/ $oracle_jre_lib_hl
     jinfos "jdk" $jvm_base$j2se_name/bin/ $oracle_bin_jdk