blob: b37fa46178181dcce781a64088f603f1d313080e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/sh
# simple wrapper script to run non-installed executables from workdir
if [ $(uname) = Darwin ]; then
dir=$(pwd)
if [ ! -d "${dir}/instdir/LibreOffice.app" ]; then
echo "error: cannot find \"instdir/LibreOffice.app\" dir in \"$(pwd)\""
exit 1
fi
exedir="${dir}"/workdir/LinkTarget/Executable
export URE_BOOTSTRAP=file://"${dir}"/instdir/LibreOffice.app/Contents/Resources/fundamentalrc
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+$DYLD_LIBRARY_PATH:}"${dir}"/instdir/LibreOffice.app/Contents/Frameworks
echo "setting URE_BOOTSTRAP to: ${URE_BOOTSTRAP}"
echo "setting search path to: ${DYLD_LIBRARY_PATH}"
echo "execing: ${exedir}/$1"
exec "${exedir}"/$@
else
dir=$(realpath "$(pwd)")
while test ! -d "${dir}/instdir/program" ; do
if test "${dir}" = "/"; then
echo "error: cannot find \"program\" dir from \"$(pwd)\""
exit 1
fi
dir=$(realpath "${dir}/..")
done
exedir="${dir}"/workdir/LinkTarget/Executable
export URE_BOOTSTRAP=file://"${dir}"/instdir/program/fundamentalrc
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${dir}"/instdir/ure/lib:"${dir}"/instdir/program
echo "setting URE_BOOTSTRAP to: ${URE_BOOTSTRAP}"
echo "setting search path to: ${LD_LIBRARY_PATH}"
echo "execing: ${exedir}/$1"
cd "${dir}"/instdir/program
exec "${exedir}"/$@
fi
|