# HG changeset patch # User Wolfgang Rosenauer # Date 1294908259 -3600 # Node ID f25759227036083896b389937543650e5bb29db2 # Parent aef7c16cb0e529ea7d87b71c8e8759b141d360ca put some more logic into MOZ_APP_LAUNCHER setting diff -r aef7c16cb0e5 -r f25759227036 MozillaFirefox/mozilla.sh.in --- a/MozillaFirefox/mozilla.sh.in Wed Jan 12 23:55:42 2011 +0100 +++ b/MozillaFirefox/mozilla.sh.in Thu Jan 13 09:44:19 2011 +0100 @@ -20,7 +20,7 @@ # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # -# Contributor(s): +# Contributor(s): # Wolfgang Rosenauer # # @@ -38,7 +38,7 @@ # # ***** END LICENSE BLOCK ***** -## +## ## Usage: ## ## $ mozilla [args] @@ -59,7 +59,16 @@ MOZ_APPNAME="%APPNAME" MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME" -export MOZ_APP_LAUNCHER="$MOZ_DIST_LIB/$MOZ_APPNAME.sh" +MOZ_APP_LAUNCHER="$MOZ_DIST_LIB/$MOZ_APPNAME.sh" +if [ "$0" = "$MOZ_APP_LAUNCHER" ]; then + [ -h "/usr/bin/$MOZ_APPNAME" ] && \ + _link=$(readlink -f "/usr/bin/$MOZ_APPNAME") + if [ "$_link" = "$MOZ_APP_LAUNCHER" ]; then + export MOZ_APP_LAUNCHER="/usr/bin/$MOZ_APPNAME" + fi +else + export MOZ_APP_LAUNCHER="/usr/bin/$MOZ_APPNAME" +fi mozilla_lib=`file $MOZ_PROGRAM` LIB=lib