[tomboy] [mac] load /etc/profile to fix LaTeX support, handle start without full path



commit f3e213e78a673ccaf3a4875bc45d3c4ca2ccccdf
Author: Tobias Abenius <tobias abenius nu>
Date:   Fri May 14 00:32:09 2010 +0200

    [mac] load /etc/profile to fix LaTeX support, handle start without full path
    
    https://bugzilla.gnome.org/show_bug.cgi?id=618577

 osx/Contents/MacOS/Tomboy |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/osx/Contents/MacOS/Tomboy b/osx/Contents/MacOS/Tomboy
index 4f0d1fa..e0605c6 100755
--- a/osx/Contents/MacOS/Tomboy
+++ b/osx/Contents/MacOS/Tomboy
@@ -2,6 +2,9 @@
 
 # fetch the path relative to the launch point where this shell script exists. (taken from macpack)
 APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`
+if test x"$APP_PATH" == "x"; then
+  APP_PATH="../../" 
+fi
 
 ASSEMBLY=Tomboy.exe
 MONO=`which mono`
@@ -9,5 +12,7 @@ MONO=`which mono`
 MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
 export DYLD_FALLBACK_LIBRARY_PATH=$APP_PATH/Contents/MacOS:$MONO_FRAMEWORK_PATH/lib:/lib:/usr/lib
 
+source /etc/profile
+
 cd "$APP_PATH/Contents/MacOS"
-exec -a "Tomboy" "$MONO" --debug $ASSEMBLY $@
\ No newline at end of file
+exec -a "Tomboy" "$MONO" --debug $ASSEMBLY $@



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]