forked from graphhopper/map-matching
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map-matching.sh
executable file
·51 lines (37 loc) · 1.13 KB
/
map-matching.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
46
47
48
49
50
51
#!/bin/bash
if [ "$JAVA_HOME" != "" ]; then
JAVA=$JAVA_HOME/bin/java
fi
if [ "$JAVA" = "" ]; then
JAVA=java
fi
echo "using $JAVA"
if [ "$1" = "action=start-server" ]; then
function set_jar_path {
JAR=$(ls matching-web/target/graphhopper-map-matching-web-*-dependencies.jar)
}
set_jar_path
if [ ! -f "$JAR" ]; then
mvn --projects hmm-lib -DskipTests=true install
mvn --projects matching-web,matching-core -DskipTests=true install assembly:single
set_jar_path
fi
ARGS="graph.location=./graph-cache jetty.resourcebase=matching-web/src/main/webapp"
elif [ "$1" = "action=test" ]; then
export MAVEN_OPTS="-Xmx400m -Xms400m"
mvn clean test verify
# return exit code of mvn
exit $?
else
function set_jar_path {
JAR=$(ls matching-core/target/graphhopper-map-matching-*-dependencies.jar)
}
set_jar_path
if [ ! -f "$JAR" ]; then
mvn --projects hmm-lib -DskipTests=true install
mvn --projects matching-core -DskipTests=true install assembly:single
set_jar_path
fi
ARGS="$@"
fi
exec "$JAVA" $JAVA_OPTS -jar $JAR $ARGS prepare.min_network_size=0 prepare.min_one_way_network_size=0