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