aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2005-06-20 18:08:33 +0000
committerGreg Lewis <glewis@FreeBSD.org>2005-06-20 18:08:33 +0000
commitd9e60aea406a68510cabb419a0e17542b6ccb161 (patch)
tree04241c1a4e23f308fb795c9fdcec4a826844c807 /java
parent4d5beacc07354a67d152a2aa1ff2d50e969418bf (diff)
downloadports-d9e60aea406a68510cabb419a0e17542b6ccb161.tar.gz
ports-d9e60aea406a68510cabb419a0e17542b6ccb161.zip
Notes
Diffstat (limited to 'java')
-rw-r--r--java/javavmwrapper/Makefile2
-rw-r--r--java/javavmwrapper/src/javavmwrapper.sh17
2 files changed, 11 insertions, 8 deletions
diff --git a/java/javavmwrapper/Makefile b/java/javavmwrapper/Makefile
index fa5cf828819d..86504088e945 100644
--- a/java/javavmwrapper/Makefile
+++ b/java/javavmwrapper/Makefile
@@ -9,7 +9,7 @@
PORTNAME= javavmwrapper
PORTVERSION= 2.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= java
MASTER_SITES= # none
DISTFILES= # none
diff --git a/java/javavmwrapper/src/javavmwrapper.sh b/java/javavmwrapper/src/javavmwrapper.sh
index 0ec3334efaf0..7113b252600d 100644
--- a/java/javavmwrapper/src/javavmwrapper.sh
+++ b/java/javavmwrapper/src/javavmwrapper.sh
@@ -226,10 +226,6 @@ sortConfiguration () {
# Check all of the VMs in the configuration file
#
checkVMs () {
- # Sort the configuration. This will also remove duplicates and
- # non-existent VMs
- sortConfiguration
-
# Ensure the configuration file exists
if [ ! -f "${CONF}" ]; then
exit 0
@@ -241,6 +237,10 @@ checkVMs () {
exit 1
fi
+ # Sort the configuration. This will also remove duplicates and
+ # non-existent VMs
+ sortConfiguration
+
# Ensure links are created for every executable for a VM.
cat "${CONF}" | \
(
@@ -273,9 +273,10 @@ registerVM () {
# Check that the given VM can be found in the configuration file
VM=`echo "${1}" | sed -E 's|[[:space:]]*#.*||' 2>/dev/null`
+ REGISTERED=
if [ ! -z "`grep "${VM}" "${CONF}"`" ]; then
- echo "${IAM}: error: JavaVM \"${VM}\" is already registered" 1>&2
- exit 1
+ echo "${IAM}: warning: JavaVM \"${VM}\" is already registered" 1>&2
+ REGISTERED="yes"
fi
# Check that the VM exists and is "sane"
@@ -301,7 +302,9 @@ registerVM () {
fi
# Add the VM to the configuration file
- echo "${1}" >> "${CONF}"
+ if [ "${REGISTERED}" != "yes" ]; then
+ echo "${1}" >> "${CONF}"
+ fi
# Create symbolic links as appropriate if they don't exist.
JAVA_HOME=`dirname "${VM}"`