forked from ThomasFooteDQ/DroidQuest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
executable file
·45 lines (42 loc) · 1.02 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#/bin/sh
RUNPRG="java"
if ! type -p "${RUNPRG}" > /dev/null;
then
if [ -n "${JAVA_HOME}" ];
then
RUNPRG="${JAVA_HOME}/bin/java"
if [ ! -x "${RUNPRG}" ];
then
echo "JAVA_HOME set, but unable to find java. Please check your java installation."
exit 1
fi
else
echo "Java 1.6 or newer needed for DQ. Must be in PATH or JAVA_HOME set."
exit 1
fi
fi
if [ -f "target/dq-2.8.jar" ];
then
echo "Starting DQ."
${RUNPRG} -jar "target/dq-2.8.jar"
else
echo "No jar found, building DQ before running."
MVNPRG="mvn"
if ! type -p "${MVNPRG}" > /dev/null;
then
if [ -n "${MAVEN_HOME}" ];
then
MVNPRG="${MAVEN_HOME}/bin/mvn"
if [ ! -x "${MVNPRG}" ];
then
echo "MAVEN_HOME set, but unable to find mvn executable. Please check your maven installation."
exit 1
fi
else
echo "Maven required to build DQ. See maven.apache.org to download."
exit 1
fi
fi
${MVNPRG} package
${MVNPRG} exec:java -Dexec.mainClass=com.droidquest.DQ
fi