forked from dbpedia/extraction-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·31 lines (24 loc) · 848 Bytes
/
run
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
#!/bin/bash
# Shortcut for mvn scala:run -Dlauncher=... -DaddArgs=...
# Must be called with one of the modules (core/, dump/, ...) as current directory.
# Example:
# extraction_framework/core> ../run LAUNCHER ARG1 ARG2 ARG3
# is equivalent to
# extraction_framework/core> mvn scala:run "-Dlauncher=LAUNCHER" "-DaddArgs=ARG1|ARG2|ARG3"
LAUNCHER="$1"
SLACK=false
ADD_ARGS="$2"
if [[ $ADD_ARGS == log-slack* ]] ;
then
ADD_ARGS=""
SLACK=${ADD_ARGS#*log-slack=}
fi
for ARG in ${@:3}
do
ADD_ARGS="$ADD_ARGS|$ARG"
done
# export MAVEN_OPTS='-Xmx4096M -XX:MaxPermSize=1024M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGC -XX:+PrintGCTimeStamps'
# export MAVEN_DEBUG='-X -e'
# if we're not on a terminal, use batch mode to avoid ugly log files
[ ! -t 1 ] && BATCH="-B"
mvn $MAVEN_DEBUG $BATCH scala:run "-Dlauncher=$LAUNCHER" "-DaddArgs=$ADD_ARGS"