Document breaking changes in NEWS.Debian
[conkeror/arlinius.git] / contrib / run-conkeror
blob35b66b2698e54c19f594a566cf3544ee088998a1
1 #! /bin/bash
3 # (C) Copyright 2008-2009 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=($(grep -h '^\[' "$HOME"/.gre.d/*.conf /etc/gre.d/*.conf 2>/dev/null | sort -urV))
24 for version in "${versions[@]}"; do
25 xrdir=$(grep -Fxh -A2 -m1 "$version" "$HOME"/.gre.d/*.conf /etc/gre.d/*.conf 2>/dev/null |\
26 grep GRE_PATH |\
27 cut -d= -f2)
28 xulrunner="${xrdir%/}/xulrunner"
29 if [[ -x "$xulrunner" ]]; then
30 exec "$xulrunner" "$conkeror"/application.ini "$@"
32 done
34 ## if we get this far, we didn't find xulrunner
35 echo "$0: cannot continue. XULRunner not found." >&2
36 exit 1