debian/conkeror.bin: Use wildcards instead of a list of xulrunner-stub versions
[conkeror.git] / debian / conkeror.bin
blob764363fcfd3c6453ce898e2c20b84b653f37bb0b
1 #!/bin/sh
2 # Wrapper around xulrunner-stub to start the xulrunner application conkeror
3 # Written by Axel Beckert <abe@deuxchevaux.org> for the Debian Project
5 # Find an appropriate xulrunner-stub binary
6 XULRUNNER=''
7 for xr in /usr/share/conkeror/xulrunner-stub*; do
8     XRTMP=`readlink -m $xr`
9     if [ -n "$XRTMP" -a -x "$XRTMP" ]; then
10         XULRUNNER=$xr
11     fi
12 done
14 if [ -z "$XULRUNNER" ]; then
15     echo "No xulrunner found. (Unsatisfied package dependencies?) Bailing out." 1>&2
16     exit 1;
19 if [ "$*" = "--help" ]; then
20     errormsg="`exec $XULRUNNER \"$@\" 2>&1`"
21     echo "$errormsg" | sed -e "s:/[^ ]*/xulrunner-stub[^ ]*:$0:; /-\(width\|height\)/d" 1>&2
22 else
23     exec $XULRUNNER "$@"