summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-12 11:11:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-12 11:11:07 +0100
commit218840babb2f220c93f1ee9850c873861e547cd3 (patch)
tree20065fad1ea38bb0b41f7324662d94f1094d17e8 /bin
parent2aa5c169cee557aa12c34e11def70a99a6fa2813 (diff)
Adapt bin/run for OS X
...which does not have realpath(1), so just require CWD to match BUILDDIR there Change-Id: I245241299d650c541f86cf440d3b57308c86d3fb
Diffstat (limited to 'bin')
-rwxr-xr-xbin/run23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/run b/bin/run
index 365e287ab9d3..b37fa4617818 100755
--- a/bin/run
+++ b/bin/run
@@ -2,6 +2,27 @@
# 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
@@ -22,3 +43,5 @@ echo "execing: ${exedir}/$1"
cd "${dir}"/instdir/program
exec "${exedir}"/$@
+
+fi