2008-03-18 06:23:11 -05:00
|
|
|
#!/bin/sh
|
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-11 04:07:20 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
2010-02-12 08:01:35 -06:00
|
|
|
# Copyright 2000, 2010 Oracle and/or its affiliates.
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
2008-04-11 04:07:20 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
2008-04-11 04:07:20 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
2008-04-11 04:07:20 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
2008-04-11 04:07:20 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
2008-04-11 04:07:20 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
|
|
|
# enable file locking
|
|
|
|
SAL_ENABLE_FILE_LOCKING=1
|
|
|
|
export SAL_ENABLE_FILE_LOCKING
|
|
|
|
|
|
|
|
# resolve installation directory
|
|
|
|
sd_cwd="`pwd`"
|
|
|
|
if [ -h "$0" ] ; then
|
|
|
|
sd_basename=`basename "$0"`
|
|
|
|
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
|
|
|
|
cd "`dirname "$0"`"
|
|
|
|
cd "`dirname "$sd_script"`"
|
|
|
|
else
|
|
|
|
cd "`dirname "$0"`"
|
|
|
|
fi
|
|
|
|
sd_prog=`pwd`
|
|
|
|
cd "$sd_cwd"
|
|
|
|
|
2011-02-08 15:15:23 -06:00
|
|
|
case "`uname -s`" in
|
|
|
|
FreeBSD)
|
2011-10-21 10:18:13 -05:00
|
|
|
sd_prog1="$sd_prog"
|
|
|
|
sd_prog2="$sd_prog/../ure-link/lib"
|
2011-02-08 15:15:23 -06:00
|
|
|
LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
;;
|
2011-02-08 15:17:12 -06:00
|
|
|
AIX)
|
2011-10-21 10:18:13 -05:00
|
|
|
sd_prog1="$sd_prog"
|
|
|
|
sd_prog2="$sd_prog/../ure-link/lib"
|
2011-02-08 15:17:12 -06:00
|
|
|
LIBPATH=$sd_prog1:$sd_prog2${LIBPATH:+:$LIBPATH}
|
|
|
|
export LIBPATH
|
|
|
|
;;
|
2011-02-08 15:15:23 -06:00
|
|
|
esac
|
|
|
|
|
2008-03-18 06:23:11 -05:00
|
|
|
#collect all bootstrap variables specified on the command line
|
|
|
|
#so that they can be passed as arguments to javaldx later on
|
|
|
|
for arg in $@
|
|
|
|
do
|
|
|
|
case "$arg" in
|
|
|
|
-env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
# extend the ld_library_path for java: javaldx checks the sofficerc for us
|
2011-10-21 10:18:13 -05:00
|
|
|
if [ -x "$sd_prog/../ure-link/bin/javaldx" ] ; then
|
|
|
|
my_path=`"$sd_prog/../ure-link/bin/javaldx" $BOOTSTRAPVARS \
|
2008-06-09 06:49:35 -05:00
|
|
|
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
|
2008-03-18 06:23:11 -05:00
|
|
|
if [ -n "$my_path" ] ; then
|
2010-10-13 07:55:18 -05:00
|
|
|
sd_platform=`uname -s`
|
|
|
|
case $sd_platform in
|
|
|
|
AIX)
|
|
|
|
LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
|
|
|
|
export LIBPATH
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
;;
|
|
|
|
esac
|
2008-03-18 06:23:11 -05:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# uncomment line below to disable anti aliasing of fonts
|
|
|
|
# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
|
|
|
|
|
|
|
|
# Set PATH so that crash_report is found:
|
|
|
|
PATH=$sd_prog${PATH+:$PATH}
|
|
|
|
export PATH
|
|
|
|
|
|
|
|
# execute binary
|
2011-10-21 04:47:47 -05:00
|
|
|
exec "$sd_prog/spadmin.bin" "$@" \
|
2008-06-09 06:49:35 -05:00
|
|
|
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
|