1#!/bin/sh 2#************************************************************** 3# 4# Licensed to the Apache Software Foundation (ASF) under one 5# or more contributor license agreements. See the NOTICE file 6# distributed with this work for additional information 7# regarding copyright ownership. The ASF licenses this file 8# to you under the Apache License, Version 2.0 (the 9# "License"); you may not use this file except in compliance 10# with the License. You may obtain a copy of the License at 11# 12# http://www.apache.org/licenses/LICENSE-2.0 13# 14# Unless required by applicable law or agreed to in writing, 15# software distributed under the License is distributed on an 16# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17# KIND, either express or implied. See the License for the 18# specific language governing permissions and limitations 19# under the License. 20# 21#************************************************************** 22 23# enable file locking 24SAL_ENABLE_FILE_LOCKING=1 25export SAL_ENABLE_FILE_LOCKING 26 27# resolve installation directory 28sd_cwd="`pwd`" 29if [ -h "$0" ] ; then 30 sd_basename=`basename "$0"` 31 sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` 32 cd "`dirname "$0"`" 33 cd "`dirname "$sd_script"`" 34else 35 cd "`dirname "$0"`" 36fi 37sd_prog=`pwd` 38cd "$sd_cwd" 39 40#collect all bootstrap variables specified on the command line 41#so that they can be passed as arguments to javaldx later on 42for arg in $@ 43do 44 case "$arg" in 45 -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";; 46 esac 47done 48 49# extend the ld_library_path for java: javaldx checks the sofficerc for us 50if [ -x "$sd_prog/javaldx" ] ; then 51 # this is a temporary hack until we can live with the default search paths 52 case "`uname -s`" in 53 FreeBSD) 54 LD_LIBRARY_PATH=$sd_prog:${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} 55 export LD_LIBRARY_PATH 56 ;; 57 esac 58 my_path=`"$sd_prog/javaldx" $BOOTSTRAPVARS \ 59 "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` 60 if [ -n "$my_path" ] ; then 61 LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} 62 export LD_LIBRARY_PATH 63 fi 64fi 65 66unset XENVIRONMENT 67 68# uncomment line below to disable anti aliasing of fonts 69# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE 70 71# Set PATH so that crash_report is found: 72PATH=$sd_prog${PATH+:$PATH} 73export PATH 74 75# execute binary 76exec "$sd_prog/spadmin.bin" "$@" \ 77 "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc" 78