#!/bin/sh # # javawrapper.sh # # Allows to install several Java Virtual Machines # on the same system and use config file/or environment # variable to select wichever to use # # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): # Maxim Sobolev wrote this file. As long as you retain # this notice you can do whatever you want with this stuff. If we meet some # day, and you think this stuff is worth it, you can buy me a beer in return. # # Maxim Sobolev # ---------------------------------------------------------------------------- # # $FreeBSD$ # # MAINTAINER= sobomax@FreeBSD.org PREFIX="%%PREFIX%%" CONF="${PREFIX}/etc/javavms" IAM=`basename "${0}"` tryrunVM () { if [ -x "${1}" ]; then exec "${@}" fi /bin/echo "${IAM}: warning: couldn't start specified JavaVM - \"${1}\"" >&2 } registerVM () { if [ x"${1}" = x"" ]; then /bin/echo "Usage: ${IAM} path" exit fi if [ ! -e "${CONF}" ]; then /usr/bin/touch "${CONF}" fi VM=`/bin/echo "${1}" | sed 's|#.*||'` if [ ! -x ${VM} ]; then /bin/echo "${IAM}: warning: the specified JavaVM \"${VM}\" either not exists or not executable" >&2 fi /bin/ed "${CONF}" >/dev/null <&2 exit 1 fi if [ x"`grep ${1} ${CONF}`" = x"" ]; then /bin/echo "${IAM}: error: \"${1}\" JavaVM is not currently registered" exit 1 fi /bin/ed "${CONF}" >/dev/null <&2 exit 1 fi # Allow coment in the ${CONF} VMS=`/usr/bin/sed 's|#.*||' < "${CONF}" | uniq` # Finally try to run one of the ${VMS} for JAVAVM in ${VMS}; do tryrunVM "${JAVAVM}" "${@}"; done echo "${IAM}: error: no suitable JavaVMs found" >&2 exit 1 nd_yarn/devel/electron4/files/minimist-1.2.3 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* - Explicitly list the dependency on Class::Loadculot2014-07-041-1/+3
* - Update to 0.103001culot2014-07-042-3/+3
* - Remove outdated PERL_LEVEL checksunpoet2014-03-071-7/+1
* - Update to 0.103000culot2014-02-052-5/+6
* - Update to 0.102364sunpoet2013-11-303-22/+23
* - Update to 0.102363sunpoet2013-10-103-32/+29
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1
* - Convert to new perl frameworkmat2013-08-031-6/+3
* - Update to 0.102362sunpoet2012-05-092-4/+9
* - Update to 0.102361sunpoet2011-09-012-9/+15
* - Cleaning MD5 in perl@'s portsjadawin2011-05-171-1/+0
* - Update to 0.102360wen2010-09-062-5/+5
* - Update to 0.101620wen2010-06-122-4/+4
* Pod::Elemental is a system for treating a Pod (plain old documentation)wen2010-05-27