make overview item work
[mandelbrot.git] / mandelbrot
index 33c4c8ff12c57fd24b29db6aafc246aea7a523e2..3a58794e3ccb2d5235f868c879d25763f9be1bfd 100755 (executable)
@@ -51,14 +51,21 @@ if test -z "$xulrunner" && test -e "/usr/local/xulrunner/xulrunner"; then
   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
 
-$xulrunner --app $app_ini -jsconsole
+$xulrunner --app $app_ini $@