runServer.sh 904 Bytes
Newer Older
1
#!/bin/sh
2

3 4 5 6
# set default lib path
if [ -z "${DISL_LIB_P}" ]; then
	DISL_LIB_P=./build
fi
7

8 9 10 11 12
# test number of arguments
if [ $# -lt 1 ]; then
	echo "Usage: `basename $0` instr-lib [java-params]"
	exit 1
fi
13

14 15 16
# get instrumentation library and shift parameters
INSTR_LIB=$1
shift
17

18 19 20 21 22 23 24 25 26 27 28
# start the instrumentation server
# options available:
#	-Ddebug=true \
#	-Ddisl.classes="list of disl classes (: - separator)"
#	-Ddisl.noexcepthandler=true \
#	-Ddisl.exclusionList="path" \
#	-Ddislserver.instrumented="path" \
#	-Ddislserver.uninstrumented="path" \
#	-Ddislserver.port="portNum" \
#	-Ddislserver.timestat=true \
#	-Ddislserver.continuous=true \
29
#	-Ddislserver.disablebypass=true \
30 31 32 33
${JAVA_HOME:+$JAVA_HOME/jre/bin/}java \
	-cp ${INSTR_LIB}:${DISL_LIB_P}/disl-server.jar \
	ch.usi.dag.dislserver.DiSLServer \
	"$@" &
34

35 36
# print pid to the server file
if [ -n "${SERVER_FILE}" ]; then
37
	echo $! > ${SERVER_FILE}
38
fi