2021-03-31 08:32:57 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [[ ! -n "$JAVA_CMD" ]]; then
|
2022-12-05 15:16:36 +01:00
|
|
|
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
|
|
|
|
JAVA_CMD="$JAVA_HOME/bin/java"
|
|
|
|
else
|
|
|
|
set +e
|
|
|
|
JAVA_CMD=$(type -p java)
|
|
|
|
set -e
|
|
|
|
if [[ ! -n "$JAVA_CMD" ]]; then
|
|
|
|
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2021-03-31 08:32:57 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f ./environ ]; then
|
2022-12-05 15:16:36 +01:00
|
|
|
source ./environ
|
2021-03-31 08:32:57 +02:00
|
|
|
fi
|
|
|
|
|
2023-02-07 15:06:35 +01:00
|
|
|
export JVM_OPTS="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow $JVM_OPTS"
|
|
|
|
|
2021-03-31 08:32:57 +02:00
|
|
|
set -x
|
2022-01-11 16:30:22 +01:00
|
|
|
exec $JAVA_CMD $JVM_OPTS "$@" -jar penpot.jar -m app.main
|