man page: Fix hyphen vs minus sign
[conkeror.git] / contrib / list-xulrunner-versions
blob178b2bcc5198a05542065d1c97ecb4338e740969
1 #! /bin/sh
3 # (C) Copyright 2010 John J. Foerch
5 # Use, modification, and distribution are subject to the terms specified in the
6 # COPYING file.
8 # This program lists the versions of XULRunner registered on the system, their
9 # installation path, and whether they exist.
11 versions=$(grep -h '^\[' "$HOME"/.gre.d/*.conf /etc/gre.d/*.conf 2>/dev/null | sort -u)
12 for version in ${versions}; do
13 xrdir=$(grep -Fxh -A2 -m1 "$version" "$HOME"/.gre.d/*.conf /etc/gre.d/*.conf 2>/dev/null |\
14 grep GRE_PATH |\
15 cut -d= -f2)
16 xulrunner="${xrdir%/}/xulrunner"
17 if [ -x "$xulrunner" ]; then
18 printf " "
19 else
20 printf "?"
21 missing=1
23 printf " $version\t$xrdir\n"
24 done
26 if [ -n "$missing" ]; then
27 echo
28 echo "XULRunner versions marked with a ? are registered but not installed."
29 echo "They can be safely cleaned out of /etc/gre.d/ and ~/.gre.d/."