forked from uuverifiers/tricera
-
Notifications
You must be signed in to change notification settings - Fork 1
/
triEnv
53 lines (38 loc) · 1.34 KB
/
triEnv
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
52
53
# Figures out where TriCera is installed and runs it with the proper classpath
# (partially copied from the scala dist.)
SOURCE=$0;
SCRIPT=`basename "${SOURCE}"`;
# Finds the root folder of the distribution, through the tempest (and the
# symbolic links)
while [ -h "${SOURCE}" ]; do
SCRIPT=`basename "${SOURCE}"`;
LOOKUP=`ls -ld "${SOURCE}"`;
TARGET=`expr "${LOOKUP}" : '.*-> \(.*\)$'`;
if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then
SOURCE=${TARGET:-.};
else
SOURCE=`dirname "${SOURCE}"`/${TARGET:-.};
fi;
done;
LAZABS_HOME=`dirname "${SOURCE}"`;
if [ -f ${LAZABS_HOME}/dist/tri-pp ]; then
# binary distribution
export TRI_PP_PATH="${LAZABS_HOME}/dist";
else if [ -f ${LAZABS_HOME}/tri-pp ]; then
# binary distribution from sbt
export TRI_PP_PATH="${LAZABS_HOME}";
else
echo "Could not find tri-pp." >&2
exit 1
fi; fi
export JAVA_OPTS="-Xmx2024m -Xss20000k";
if [ -f ${LAZABS_HOME}/dist/tricera.jar ]; then
# binary distribution
export LAZABS_CMD="java ${JAVA_OPTS} -cp ${LAZABS_HOME}/dist/tricera.jar"
else if [ -f ${LAZABS_HOME}/target/scala-2.*/TriCera-assembly*.jar ]; then
# binary distribution from sbt
export LAZABS_CMD="java ${JAVA_OPTS} -cp ${LAZABS_HOME}/target/scala-2.*/TriCera-assembly*.jar"
else
echo "Could not find TriCera jar" >&2
exit 1
fi; fi