2009-07-29 08:59:06 -05:00
|
|
|
#!/bin/bash
|
2009-07-06 05:30:52 -05:00
|
|
|
|
2008-11-26 06:04:07 -06:00
|
|
|
PS=":"
|
|
|
|
# cygwin:
|
|
|
|
if [ "$GUI" = "WNT" ]; then
|
|
|
|
PS=";"
|
|
|
|
fi
|
2003-11-18 09:07:00 -06:00
|
|
|
|
2003-10-06 06:29:37 -05:00
|
|
|
JARFOLDER=$SOLARVERSION/$INPATH/bin$UPDMINOREXT
|
2008-06-13 06:28:33 -05:00
|
|
|
SOLVER_LIB=$SOLARVERSION/$INPATH/lib$UPDMINOREXT
|
2008-12-11 02:26:21 -06:00
|
|
|
|
2009-07-03 05:14:57 -05:00
|
|
|
# it is possible to give an other OOoRunner.jar
|
2008-12-11 02:26:21 -06:00
|
|
|
if [ -n "$RUNNERJAR" ]; then
|
|
|
|
myCLASSPATH=$RUNNERJAR
|
|
|
|
else
|
|
|
|
myCLASSPATH=$JARFOLDER/OOoRunner.jar
|
|
|
|
fi
|
|
|
|
|
2009-07-06 05:30:52 -05:00
|
|
|
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
|
2007-07-24 07:30:49 -05:00
|
|
|
|
|
|
|
if [ -n "$JAVAI" ]; then
|
|
|
|
JAVABIN=$JAVAI
|
|
|
|
elif [ -n "$JAVA_HOME" ]; then
|
2008-08-27 07:37:10 -05:00
|
|
|
if [ "$OS$CPUNAME$CPU" = SOLARISSPARCU ]; then
|
|
|
|
JAVABIN=$JAVA_HOME/bin/sparcv9/java
|
|
|
|
else
|
|
|
|
JAVABIN=$JAVA_HOME/bin/java
|
|
|
|
fi
|
2007-07-24 07:30:49 -05:00
|
|
|
else
|
2009-07-03 05:14:57 -05:00
|
|
|
# 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
|
2007-07-24 07:30:49 -05:00
|
|
|
fi
|
|
|
|
|
2008-09-30 02:44:27 -05:00
|
|
|
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
|
2008-11-26 06:04:07 -06:00
|
|
|
PARAM="$PARAM -runnerini $RUNNERPROPS"
|
|
|
|
fi
|
|
|
|
|
2009-07-06 05:30:52 -05:00
|
|
|
DEBUG_THE_API=""
|
|
|
|
if [ -n "$DEBUGAPI" ]; then
|
|
|
|
export DEBUGAPI="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9002,suspend=y"
|
|
|
|
DEBUG_THE_API=$DEBUGAPI
|
2008-09-30 02:44:27 -05:00
|
|
|
fi
|
2008-06-13 06:28:33 -05:00
|
|
|
|
2009-07-06 05:30:52 -05:00
|
|
|
COMMAND="$JAVABIN -Xmx120m $DEBUG_THE_API -cp $myCLASSPATH org.openoffice.Runner $PARAM $*"
|
2008-06-13 06:28:33 -05:00
|
|
|
echo $COMMAND
|
|
|
|
$COMMAND
|
2009-07-06 05:30:52 -05:00
|
|
|
# if COMMAND fails, it returns also the exitcode
|