xulrunner="/usr/local/xulrunner/xulrunner"
fi
if test -z "$xulrunner"; then
- if test -n `which xulrunner`; then
- xulrunner=`which xulrunner`
- else
- echo "XULRunner not found!"
- exit 1
- fi
+ # catch the last one of those in versioned directories
+ for xrbin in /usr/local/lib/xulrunner-*/xulrunner; do
+ if test -e "$xrbin"; then
+ xulrunner="$xrbin"
+ fi
+ done
+fi
+if test -z "$xulrunner"; then
+ xulrunner=`which xulrunner`
+fi
+if test -z "$xulrunner"; then
+ echo "XULRunner not found!"
+ exit 1
fi
# add -jsconsole for debugging