Debian package: Mention changed CFLAGS handling in debian/changelog
[conkeror.git] / contrib / run-conkeror
blobb0d0bb326a54881def2786c79524a1066013b32f
1 #! /bin/sh
3 # (C) Copyright 2008-2010 John J. Foerch
5 # Use, modification, and distribution are subject to the terms specified in the
6 # COPYING file.
8 # This bash script can be used to launch conkeror on *nix systems that
9 # support symlinking. Create a symlink to this script in a directory
10 # in your executable search path.
12 # For example:
14 # sudo ln -s /path/to/conkeror/contrib/run-conkeror /usr/local/bin/conkeror
17 ## locate conkeror
18 thisscript=$(readlink -f "$0")
19 contrib=${thisscript%/*}
20 conkeror=${contrib%/*}
22 ## locate xulrunner
23 versions=${CONKEROR_XULRUNNER_VERSION:-$(grep -h '^\[' "$HOME"/.gre.d/*.conf /etc/gre.d/*.conf 2>/dev/null \
24 | sed -e 's/^\[\(.*\)\]/\1/' \
25 | sort -urV)}
26 for version in ${versions}; do
27 xrdir=$(grep -Fxh -A2 -m1 "[$version]" "$HOME"/.gre.d/*.conf /etc/gre.d/*.conf 2>/dev/null |\
28 grep GRE_PATH |\
29 cut -d= -f2)
30 xulrunner="${xrdir%/}/xulrunner"
31 if [ -x "$xulrunner" ]; then
32 exec "$xulrunner" "$conkeror"/application.ini "$@"
34 done
36 ## if we get this far, we didn't find xulrunner
37 echo "$0: cannot continue. XULRunner not found." >&2
38 exit 1