blob: 5f19edc0c69f4da39b35490729154dc60c98bc6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
SCRIPT_DIRECTORY=/usr/share/java/mirror
MAIN=mirror.Mirror
JAR=mirror-all.jar
OPTS="-Xmx2G -XX:+HeapDumpOnOutOfMemoryError"
if [ -e ${SCRIPT_DIRECTORY}/${JAR} ]; then
java $OPTS -cp ${SCRIPT_DIRECTORY}/${JAR} $MAIN "$@"
# elif [ -e ${SCRIPT_DIRECTORY}/build/libs/${JAR} ]; then
# java $OPTS -cp ${SCRIPT_DIRECTORY}/build/libs/${JAR} $MAIN "$@"
else
echo "${JAR} not found in ${SCRIPT_DIRECTORY}"
exit 1
fi
|