File: ilcontrast.in

package info (click to toggle)
mono-tools 4.2-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 13,868 kB
  • sloc: cs: 100,909; sh: 3,845; makefile: 2,040; javascript: 1,557; xml: 126
file content (43 lines) | stat: -rw-r--r-- 1,349 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh

prefix=@prefix@
exec_prefix=@exec_prefix@

ilcontrastdir=$prefix/lib/ilcontrast

getdirectory () {
    w=`which $1`
    if test -h $w; then
	(cd `dirname $w`/`dirname \`readlink $w\``; pwd)
    else
	dirname $w
    fi
}

if test -n "$MOZILLA_FIVE_HOME"; then
	MOZILLA_HOME=$MOZILLA_FIVE_HOME
elif test x@MOZILLA_HOME@ != x; then
    if [ -f @MOZILLA_HOME@/chrome/comm.jar ]; then
        MOZILLA_HOME=@MOZILLA_HOME@
    fi 
elif grep GRE_PATH /etc/gre.d/*.conf > /dev/null ; then
        MOZILLA_HOME=$(grep -h GRE_PATH= /etc/gre.d/*.conf | cut -d '"' -f 2 -d = | head -n 1)
elif [ $(which xulrunner 2> /dev/null) ] > /dev/null ; then
    MOZILLA_FIVE_HOME=`getdirectory xulrunner`
    MOZILLA_HOME=$MOZILLA_FIVE_HOME
elif [ $(which mozilla 2> /dev/null) ] && grep MOZILLA_FIVE_HOME= "$(which mozilla)" > /dev/null ; then
	MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which mozilla) | cut -d '"' -f 2)
elif [ $(which firefox 2> /dev/null) ] && grep MOZILLA_FIVE_HOME= "$(which firefox)" > /dev/null ; then
	MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which firefox) | cut -d '"' -f 2)
fi

if [ -n $LD_LIBRARY_PATH ]; then
	export LD_LIBRARY_PATH=$MOZILLA_HOME:$LD_LIBRARY_PATH
else
	export LD_LIBRARY_PATH=$MOZILLA_HOME
fi
export MOZILLA_FIVE_HOME 
export MOZILLA_HOME 
export LD_LIBRARY_PATH

exec @RUNTIME@ $ilcontrastdir/ilcontrast.exe "$@"