diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2019-08-10 19:28:18 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2019-08-10 19:28:18 +0000 |
commit | 2d13292940dc21b831dee08ff2f390a851679b44 (patch) | |
tree | be41f3d17b61524c1b6c8d415b8d17547a31912e /java/javavmwrapper/files | |
parent | textproc/py-pikepdf: Update to 1.6.1 (diff) |
Fixes to pkg-install and version handling
* In pkg-install, fix the exclusion of the bootstrap directories. [1]
* In pkg-install, fix the find expression so it actually finds jdks if
there are multiple present. [1]
* When determining the VM version, be better about ensuring we end up
with only a number.
PR: 239705 [1]
Submitted by: John Hein <jcfyecrayz@liamekaens.com> [1]
Notes
Notes:
svn path=/head/; revision=508503
Diffstat (limited to 'java/javavmwrapper/files')
-rw-r--r-- | java/javavmwrapper/files/pkg-install.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/java/javavmwrapper/files/pkg-install.in b/java/javavmwrapper/files/pkg-install.in index dde5ad143032..aab50822f072 100644 --- a/java/javavmwrapper/files/pkg-install.in +++ b/java/javavmwrapper/files/pkg-install.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/java/javavmwrapper/files/pkg-install.in,v 1.3 2006-06-03 17:32:24 glewis Exp $ +# $FreeBSD$ LOCALBASE=%%LOCALBASE%% @@ -10,16 +10,19 @@ if [ "x${2}" != "xPOST-INSTALL" ]; then fi # Ensure all JDKs and JREs are installed -_excl_dirs='bootstrap-openjdk' +jdirs=$(cd "${LOCALBASE}" && find *jdk* *jre* -depth 0 -type d 2> /dev/null) +set -o noglob +_excl_dirs='bootstrap-openjdk.*' _find_expr='-depth 2 -regex .*/bin/java' for dir in ${_excl_dirs}; do _find_expr="${_find_expr} ! -regex ${dir}/bin/java" done -for jvm in `cd "${LOCALBASE}" && find *jdk* *jre* ${_find_expr} 2> /dev/null`; do +for jvm in `cd "${LOCALBASE}" && find $jdirs ${_find_expr} 2> /dev/null`; do if [ -x "${LOCALBASE}/${jvm}" ]; then "${PKG_PREFIX}"/bin/registervm "${LOCALBASE}/${jvm}" > /dev/null 2>&1 fi done +set +o noglob # Ensure all VMs are configured correctly "${PKG_PREFIX}"/bin/checkvms |