blob: f86fcefb93d105bb045151f7238e10f31cab2e9b (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/bin/bash
PS=":"
# cygwin:
if [ "$GUI" = "WNT" ]; then
PS=";"
fi
JARFOLDER=$SOLARVERSION/$INPATH/bin$UPDMINOREXT
SOLVER_LIB=$SOLARVERSION/$INPATH/lib$UPDMINOREXT
# it is possible to give an other OOoRunner.jar
if [ -n "$RUNNERJAR" ]; then
myCLASSPATH=$RUNNERJAR
else
myCLASSPATH=$JARFOLDER/OOoRunner.jar
fi
myCLASSPATH=$myCLASSPATH${PS}${JARFOLDER}/ridl.jar${PS}\
${JARFOLDER}/unoil.jar${PS}\
${JARFOLDER}/jurt.jar${PS}\
${JARFOLDER}/juh.jar${PS}\
${JARFOLDER}/java_uno.jar
myCLASSPATH=$myCLASSPATH${PS}\
/net/unoapi/export/unoapi/bin/mysql.jar${PS}\
$SOLVER_LIB
if [ -n "$JAVAI" ]; then
JAVABIN=$JAVAI
elif [ -n "$JAVA_HOME" ]; then
if [ "$OS$CPUNAME$CPU" = SOLARISSPARCU ]; then
JAVABIN=$JAVA_HOME/bin/sparcv9/java
else
JAVABIN=$JAVA_HOME/bin/java
fi
else
# there seems to be some machines without real java
JAVABIN=$(which java)
if [ -z "$JAVABIN" ]; then
echo "please set environment variable JAVA_HOME"
exit 1
fi
fi
if [ x${USER}x = xx ]; then
if [ x${LOGNAME}x = xx ]; then
echo "ERROR: could not determine username. Please export variable USER" >&2
exit $EXIT_FAILURE
else
USER=$LOGNAME
export USER
fi
fi
PARAM="-cs pipe,name=$USER -SRC_ROOT $SRC_ROOT"
if [ -n "$RUNNERPROPS" ]; then
PARAM="$PARAM -runnerini $RUNNERPROPS"
fi
DEBUG_THE_API=""
if [ -n "$DEBUGAPI" ]; then
export DEBUGAPI="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9002,suspend=y"
DEBUG_THE_API=$DEBUGAPI
fi
COMMAND="$JAVABIN -Xmx120m $DEBUG_THE_API -cp $myCLASSPATH org.openoffice.Runner $PARAM $*"
echo $COMMAND
$COMMAND
# if COMMAND fails, it returns also the exitcode
|