mirror of
https://git.freebsd.org/ports.git
synced 2025-05-02 11:36:40 -04:00
- Submitter changes MAINTAINER to his @apache.org address - Bump version to 2 - Use ETCDIR wherever possible - Also install mvnDebug - Burry long dead M2_HOME in favor of MAVEN_HOME which will *never* be propagated PR: 265028, 265025
24 lines
528 B
Bash
24 lines
528 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
SCRIPT_NAME="$(basename $0)"
|
|
|
|
if [ -z "${MAVEN_HOME}" ] ; then
|
|
INSTANCES_DIRECTORY="%%ETCDIR%%/instances.d"
|
|
INSTANCE="$(%%FIND%% -s "${INSTANCES_DIRECTORY}" -type f -mindepth 1 -maxdepth 1 | %%TAIL%% -n 1)"
|
|
|
|
if [ -z "${INSTANCE}" ] ; then
|
|
echo "Could not find a Maven instance in ${INSTANCES_DIRECTORY}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
MAVEN_HOME="$(%%CAT%% "${INSTANCE}")"
|
|
|
|
if [ ! -d "${MAVEN_HOME}" ] ; then
|
|
echo "Not a directory: ${MAVEN_HOME}" >&2
|
|
exit 2
|
|
fi
|
|
fi
|
|
|
|
exec "${MAVEN_HOME}/bin/${SCRIPT_NAME}" "$@"
|