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/../basis-link/ure-link/bin/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 sd_prog1="$sd_prog/../basis-link/program" 55 sd_prog2="$sd_prog/../basis-link/ure-link/lib" 56 LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} 57 export LD_LIBRARY_PATH 58 ;; 59 esac 60 my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \ 61 "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` 62 if [ -n "$my_path" ] ; then 63 LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} 64 export LD_LIBRARY_PATH 65 fi 66fi 67 68unset XENVIRONMENT 69 70# uncomment line below to disable anti aliasing of fonts 71# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE 72 73# Set PATH so that crash_report is found: 74PATH=$sd_prog${PATH+:$PATH} 75export PATH 76 77# execute binary 78exec "$sd_prog/../basis-link/program/spadmin.bin" "$@" \ 79 "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc" 80