NSISBug1125: firefox

File firefox, 1.3 KB (added by abllee, 22 months ago)
Line 
1#!/bin/sh
2
3basedir=$(dirname "$0")
4
5add_LD_LIBRARY_PATH() {
6  if test -z "$LD_LIBRARY_PATH"
7  then
8    LD_LIBRARY_PATH="$1"
9  else
10    LD_LIBRARY_PATH="$1:$LD_LIBRARY_PATH"
11  fi
12}
13
14# Bug 27552: On CentOS/RHEL 6, we need to add the firefox bundled dir
15# to LD_LIBRARY_PATH
16if test -f /etc/system-release-cpe
17then
18  if test "$(cut -d : -f 3 /etc/system-release-cpe)" = centos || \
19        test "$(cut -d : -f 3 /etc/system-release-cpe)" = "enterprise_linux"
20  then
21    if test "$(cut -d : -f 5 /etc/system-release-cpe)" = "6"
22    then
23      if test -d /usr/lib64/firefox/bundled/lib64
24      then
25        add_LD_LIBRARY_PATH /usr/lib64/firefox/bundled/lib64
26      elif test -d /usr/lib/firefox/bundled/lib
27      then
28        add_LD_LIBRARY_PATH /usr/lib/firefox/bundled/lib
29      else
30        echo "Error: the firefox package (version 60 or more) is not installed." >&2
31        echo "On CentOS/RHEL 6, Tor Browser requires the firefox package to be installed." >&2
32        exit 1
33      fi
34    fi
35  fi
36fi
37
38# Check if the system has a more recent version of libstdc++.so.6; if yes, use
39# that instead of the bundled version.
40"$basedir/abicheck" >/dev/null 2>&1
41if [ $? -ne 0 ]; then
42  add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/libstdc++/"
43fi
44add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/"
45export LD_LIBRARY_PATH
46
47exec "$basedir/firefox.real" "$@"