summaryrefslogtreecommitdiff
path: root/firefox.sh.in
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@fedoraproject.org>2007-02-21 17:44:08 +0000
committerDavid Woodhouse <dwmw2@fedoraproject.org>2007-02-21 17:44:08 +0000
commitfa5aab63530fe9c7327f347d648e8017323235d8 (patch)
treef26227dbdcb7f043ad3ea026c37b92988be90f02 /firefox.sh.in
parent- Start using the specified locale (diff)
downloadlibrewolf-fedora-ff-fa5aab63530fe9c7327f347d648e8017323235d8.tar.gz
librewolf-fedora-ff-fa5aab63530fe9c7327f347d648e8017323235d8.tar.bz2
librewolf-fedora-ff-fa5aab63530fe9c7327f347d648e8017323235d8.zip
- Fix PPC64 runtime
- Fix firefox script to use 32-bit browser by default on PPC64 hardware
Diffstat (limited to 'firefox.sh.in')
-rw-r--r--firefox.sh.in27
1 files changed, 23 insertions, 4 deletions
diff --git a/firefox.sh.in b/firefox.sh.in
index 1af0b7e..22a7f26 100644
--- a/firefox.sh.in
+++ b/firefox.sh.in
@@ -36,10 +36,29 @@ cmdname=`basename $0`
##
## Variables
##
-MOZ_LIB_DIR="/usr/lib"
-if [ -x "/usr/lib64/firefox-FIREFOX_VERSION/firefox-bin" ]
-then
- MOZ_LIB_DIR="/usr/lib64"
+MOZ_ARCH=$(uname -m)
+case $MOZ_ARCH in
+ x86_64 | ia64 | s390 )
+ MOZ_LIB_DIR="/usr/lib64"
+ SECONDARY_LIB_DIR="/usr/lib"
+ ;;
+ * )
+ MOZ_LIB_DIR="/usr/lib"
+ SECONDARY_LIB_DIR="/usr/lib64"
+ ;;
+esac
+
+#[ -r /etc/sysconfig/firefox-arch ] && . /etc/sysconfig/firefox-arch
+
+if [ ! -x $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
+ if [ ! -x $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
+ echo "Error: $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
+ if [ -d $SECONDARY_LIB_DIR ]; then
+ echo " $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
+ fi
+ exit 1
+ fi
+ MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
fi
MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox-FIREFOX_VERSION"
MOZ_PROGRAM="$MOZ_DIST_BIN/firefox-bin"
bgstack15