Debian package: Declare compliance with Debian Policy 4.3.0
[conkeror.git] / debian / bin / conkeror
blob29276dbe05c742ab7702647db0ec9f98b376d874
1 #!/bin/sh
2 # Wrapper around xulrunner/firefox to start the xulrunner application conkeror
3 # Written by Axel Beckert <abe@deuxchevaux.org> for the Debian Project
5 # Required for more recent Firefox versions, i.e. >= 48
6 XUL_APP_FILE=/usr/share/conkeror/application.ini
7 export XUL_APP_FILE
9 # Find an appropriate xulrunner binary
10 XULRUNNER=''
12 # *sigh* No more xulrunner since iceweasel 30
13 if [ -x /usr/bin/waterfox ]; then
14 XULRUNNER="/usr/bin/waterfox"
15 elif [ -x /usr/bin/firefox-esr ]; then
16 XULRUNNER="/usr/bin/firefox-esr"
17 elif [ -x /usr/bin/iceweasel ]; then
18 XULRUNNER="/usr/bin/iceweasel"
19 elif [ -x /usr/bin/firefox ]; then
20 XULRUNNER="/usr/bin/firefox"
23 if [ -z "$XULRUNNER" ]; then
24 echo "No Waterfox or Firefox or Iceweasel found. Bailing out." 1>&2
25 exit 1;
28 if [ "$*" = "--help" ]; then
29 errormsg="`exec $XULRUNNER \"$@\" 2>&1`"
30 echo "$errormsg" | sed -e "s:/[^ ]*/xulrunner-bin:$0:; /-\(width\|height\)/d" 1>&2
31 else
32 exec $XULRUNNER "$@"