refine finding of XULRunner a bit to accept versioned dirs like in Fennec Beta 1...
authorRobert Kaiser <kairo@kairo.at>
Tue, 28 Apr 2009 20:07:26 +0000 (22:07 +0200)
committerRobert Kaiser <kairo@kairo.at>
Tue, 28 Apr 2009 20:07:26 +0000 (22:07 +0200)
mandelbrot

index 62bb8d8..7d05df5 100755 (executable)
@@ -51,12 +51,19 @@ 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