fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / padmin / source / spadmin.sh
blob743393957de442a64e8a9515b78b70b086b9d664
1 #!/bin/sh
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # enable file locking
21 SAL_ENABLE_FILE_LOCKING=1
22 export SAL_ENABLE_FILE_LOCKING
24 # resolve installation directory
25 sd_cwd="`pwd`"
26 if [ -h "$0" ] ; then
27 sd_basename=`basename "$0"`
28 sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
29 cd "`dirname "$0"`"
30 cd "`dirname "$sd_script"`"
31 else
32 cd "`dirname "$0"`"
34 sd_prog=`pwd`
35 cd "$sd_cwd"
37 case "`uname -s`" in
38 FreeBSD)
39 sd_prog1="$sd_prog"
40 sd_prog2="$sd_prog/../ure-link/lib"
41 LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
42 export LD_LIBRARY_PATH
44 AIX)
45 sd_prog1="$sd_prog"
46 sd_prog2="$sd_prog/../ure-link/lib"
47 LIBPATH=$sd_prog1:$sd_prog2${LIBPATH:+:$LIBPATH}
48 export LIBPATH
50 esac
52 #collect all bootstrap variables specified on the command line
53 #so that they can be passed as arguments to javaldx later on
54 for arg in $@
56 case "$arg" in
57 -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
58 esac
59 done
61 # extend the ld_library_path for java: javaldx checks the sofficerc for us
62 if [ -x "$sd_prog/../ure-link/bin/javaldx" ] ; then
63 my_path=`"$sd_prog/../ure-link/bin/javaldx" $BOOTSTRAPVARS \
64 "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
65 if [ -n "$my_path" ] ; then
66 sd_platform=`uname -s`
67 case $sd_platform in
68 AIX)
69 LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
70 export LIBPATH
73 LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
74 export LD_LIBRARY_PATH
76 esac
80 # uncomment line below to disable anti aliasing of fonts
81 # SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
83 # Set PATH so that crash_report is found:
84 PATH=$sd_prog${PATH+:$PATH}
85 export PATH
87 # execute binary
88 exec "$sd_prog/spadmin.bin" "$@" \
89 "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"