blob: 6d76dd5052a585d91fd6b11958cefc0ec2807a97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
LOCALBASE=%%LOCALBASE%%
# This script runs during post-install
if [ "x${2}" != "xPOST-INSTALL" ]; then
exit 0
fi
# Ensure all JDKs and JREs are installed
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 $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
|