blob: c7993bd91c35f930cb41ce6a6f0fdec2fe7cfe06 (
plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#!/bin/sh
reWrite() {
ret=""
WD=`pwd`
for arg in $*
do
if [ -f ./$arg ]
then
ret="$ret $WD/$arg"
else
ret="$ret $arg"
fi
done
echo "$ret"
}
#(NOTE: any changes to this block should be kept in sync with the one in configure.in)
if test -n "$MOZILLA_FIVE_HOME"; then
MOZILLA_HOME=$MOZILLA_FIVE_HOME
elif [ -f @MOZILLA_HOME@/chrome/comm.jar ]; then
MOZILLA_HOME=@MOZILLA_HOME@
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 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 | 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 | cut -d '=' -f 2 )
elif [ $(which firefox 2>/dev/null) ] && grep MOZILLA_LIBDIR= "$(which firefox)" > /dev/null ; then
MOZILLA_HOME=$(grep MOZILLA_LIBDIR= $(which firefox) | cut -d '"' -f 2 | cut -d '=' -f 2)
else
echo "Cannot find mozilla installation directory. Please set MOZILLA_FIVE_HOME to your mozilla directory"
exit 1
fi
MD_BIN_PATH=@prefix@/lib/monodevelop/bin
if [ -n $LD_LIBRARY_PATH ]; then
export LD_LIBRARY_PATH=$MOZILLA_HOME:$LD_LIBRARY_PATH
else
export LD_LIBRARY_PATH=$MOZILLA_HOME
fi
if [ -n $PKG_CONFIG_PATH ]; then
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:@gtksharp_prefix@/lib/pkgconfig/
else
export PKG_CONFIG_PATH=@gtksharp_prefix@/lib/pkgconfig/
fi
export MOZILLA_FIVE_HOME=$MOZILLA_HOME
ARGS=`reWrite "$@"`
set -- $ARGS
cd $MD_BIN_PATH
case x$1 in
x--profile)
exec @RUNTIME@ --profile ./MonoDevelop.exe $@
exit 0
;;
x--debug)
export MONODEVELOP_DISPATCH_DEBUG=yes
exec @RUNTIME@ --debug ./MonoDevelop.exe $@
exit 0
;;
x--trace)
exec @RUNTIME@ --trace ./MonoDevelop.exe $@
exit 0;
;;
esac
exec @RUNTIME@ ./MonoDevelop.exe $@
|