2 # Wrapper around xulrunner/firefox to start the xulrunner application conkeror
3 # Written by Axel Beckert <abe@deuxchevaux.org> for the Debian Project
5 # Find an appropriate xulrunner binary
8 # *sigh* No more xulrunner since iceweasel 30
9 if [ -x /usr
/bin
/iceweasel
]; then
10 XULRUNNER
="/usr/bin/iceweasel -app"
14 if [ -z "$XULRUNNER" ]; then
15 # Due to http://bugs.debian.org/683157 we have to skip xulrunner-14.0
16 for version
in `LC_ALL=C seq 30 -1 15` `LC_ALL=C seq 13 -1 5` 2 1.9.2 1.9.1; do
17 for subversion
in $version $version.0; do
18 XRTMP
=`which xulrunner-$subversion`
19 if [ -n "$XRTMP" -a -x "$XRTMP" ]; then
27 # Try firefox if no xulrunner can be found
28 if [ -z "$XULRUNNER" ]; then
30 if [ -n "$FFTMP" -a -x "$FFTMP" ]; then
31 echo "xulrunner not found, trying firefox instead." 1>&2
32 XULRUNNER
="$FFTMP -app"
36 if [ -z "$XULRUNNER" ]; then
37 echo "xulrunner version 1.9.1 (or iceweasel/firefox version 3.5) or newer required, but not found. Bailing out." 1>&2
41 if [ "$*" = "--help" ]; then
42 errormsg
="`exec $XULRUNNER /usr/share/conkeror/application.ini \"$@\" 2>&1`"
43 echo "$errormsg" |
sed -e "s:/[^ ]*/xulrunner-bin:$0:; /-\(width\|height\)/d" 1>&2
45 exec $XULRUNNER /usr
/share
/conkeror
/application.ini
"$@"