merge the formfield patch from ooo-build
[ooovba.git] / solenv / bin / checkapi
blobf86fcefb93d105bb045151f7238e10f31cab2e9b
1 #!/bin/bash
3 PS=":"
4 # cygwin:
5 if [ "$GUI" = "WNT" ]; then
6 PS=";"
7 fi
9 JARFOLDER=$SOLARVERSION/$INPATH/bin$UPDMINOREXT
10 SOLVER_LIB=$SOLARVERSION/$INPATH/lib$UPDMINOREXT
12 # it is possible to give an other OOoRunner.jar
13 if [ -n "$RUNNERJAR" ]; then
14 myCLASSPATH=$RUNNERJAR
15 else
16 myCLASSPATH=$JARFOLDER/OOoRunner.jar
19 myCLASSPATH=$myCLASSPATH${PS}${JARFOLDER}/ridl.jar${PS}\
20 ${JARFOLDER}/unoil.jar${PS}\
21 ${JARFOLDER}/jurt.jar${PS}\
22 ${JARFOLDER}/juh.jar${PS}\
23 ${JARFOLDER}/java_uno.jar
25 myCLASSPATH=$myCLASSPATH${PS}\
26 /net/unoapi/export/unoapi/bin/mysql.jar${PS}\
27 $SOLVER_LIB
29 if [ -n "$JAVAI" ]; then
30 JAVABIN=$JAVAI
31 elif [ -n "$JAVA_HOME" ]; then
32 if [ "$OS$CPUNAME$CPU" = SOLARISSPARCU ]; then
33 JAVABIN=$JAVA_HOME/bin/sparcv9/java
34 else
35 JAVABIN=$JAVA_HOME/bin/java
37 else
38 # there seems to be some machines without real java
39 JAVABIN=$(which java)
40 if [ -z "$JAVABIN" ]; then
41 echo "please set environment variable JAVA_HOME"
42 exit 1
46 if [ x${USER}x = xx ]; then
47 if [ x${LOGNAME}x = xx ]; then
48 echo "ERROR: could not determine username. Please export variable USER" >&2
49 exit $EXIT_FAILURE
50 else
51 USER=$LOGNAME
52 export USER
56 PARAM="-cs pipe,name=$USER -SRC_ROOT $SRC_ROOT"
58 if [ -n "$RUNNERPROPS" ]; then
59 PARAM="$PARAM -runnerini $RUNNERPROPS"
62 DEBUG_THE_API=""
63 if [ -n "$DEBUGAPI" ]; then
64 export DEBUGAPI="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9002,suspend=y"
65 DEBUG_THE_API=$DEBUGAPI
68 COMMAND="$JAVABIN -Xmx120m $DEBUG_THE_API -cp $myCLASSPATH org.openoffice.Runner $PARAM $*"
69 echo $COMMAND
70 $COMMAND
71 # if COMMAND fails, it returns also the exitcode