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
|
|
|
#
|
2008-04-11 04:07:20 -05:00
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
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
|
|
|
# $RCSfile: spadmin.sh,v $
|
2008-03-18 06:23:11 -05:00
|
|
|
#
|
2008-06-09 06:49:35 -05:00
|
|
|
# $Revision: 1.4 $
|
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"
|
|
|
|
|
|
|
|
#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
|
|
|
|
if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
|
|
|
|
my_path=`"$sd_prog/../basis-link/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
|
|
|
|
LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
unset XENVIRONMENT
|
|
|
|
|
|
|
|
# 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
|
|
|
|
exec "$sd_prog/../basis-link/program/spadmin.bin" "$@" \
|
2008-06-09 06:49:35 -05:00
|
|
|
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
|