From 9befeffb813c5d512d4f11a961d0602694149ccf54fb48e55fbb156cf4b48406 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Thu, 13 Jan 2011 09:05:01 +0000 Subject: [PATCH] applauncher OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=181 --- mozilla.sh.in | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mozilla.sh.in b/mozilla.sh.in index 7cfa0c6..a69ca0f 100644 --- a/mozilla.sh.in +++ b/mozilla.sh.in @@ -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_DIST_LIB="%PROGDIR" 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