input_state, input_stack: don't store window reference
[conkeror/arlinius.git] / debian / conkeror.bin
blob11b2fe830e6b2cc3ed775f5133d5d9c35ab252e0
1 #!/bin/sh
2 # Wrapper around xulrunner to start the xulrunner application conkeror
3 # Written by Axel Beckert <abe@deuxchevaux.org> for the Debian Project
5 # Find an appropriate xulrunner binary
6 XULRUNNER=''
7 for xr in xulrunner-1.9.1 xulrunner-1.9.2 xulrunner-1.9 xulrunner; do
8     XRTMP=`which $xr`
9     if [ -n "$XRTMP" -a -x "$XRTMP" ]; then
10         if expr `$XRTMP --gre-version | cut -d . -f 1,2` '>=' 1.9 > /dev/null; then
11             # xulrunner is version 1.9 or higher, take it
12             XULRUNNER=$XRTMP
13             break
14         else
15             # xulrunner is older than version 1.9, forget it
16             XRTMP=/usr/lib/$xr/xulrunner
17             if [ -x $XRTMP ]; then
18                 if expr `$XRTMP --gre-version | cut -d . -f 1,2` '>=' 1.9 > /dev/null; then
19                     # xulrunner is a 1.9 version, take it
20                     XULRUNNER=$XRTMP
21                     break
22                 fi
23             fi
24         fi
25     fi
26 done
28 if [ -z "$XULRUNNER" ]; then
29     echo "xulrunner version 1.9 required, but not found. Bailing out." 1>&2
30     exit 1;
33 if [ "$*" = "--help" ]; then
34     errormsg="`exec $XULRUNNER /usr/share/conkeror/application.ini \"$@\" 2>&1`"
35     echo "$errormsg" | sed -e "s:/[^ ]*/xulrunner-bin:$0:; /-\(width\|height\)/d" 1>&2
36 else
37     exec $XULRUNNER /usr/share/conkeror/application.ini "$@"