[izpack-changes] r1453 - izpack-src/trunk/src/dist-files

noreply at berlios.de noreply at berlios.de
Mon Jun 26 10:47:57 CEST 2006


Author: eppelman
Date: 2006-06-26 10:47:40 +0200 (Mon, 26 Jun 2006)
New Revision: 1453

Modified:
   izpack-src/trunk/src/dist-files/start.sh
Log:
fixed lookForRunningGecko() - function to work with current firefox releases too.

Modified: izpack-src/trunk/src/dist-files/start.sh
===================================================================
--- izpack-src/trunk/src/dist-files/start.sh	2006-06-23 14:06:49 UTC (rev 1452)
+++ izpack-src/trunk/src/dist-files/start.sh	2006-06-26 08:47:40 UTC (rev 1453)
@@ -60,19 +60,28 @@
 
 function lookForRunningGecko(){
   if command -v firefox &>/dev/null; then
-    if command firefox -remote "ping()" &>/dev/null; then
-      echo firefox # firefox -remote \"openurl("$1",new-tab)\"
+    tempfile=`mktemp`
+  	
+    firefox -remote "ping()" 2> $tempfile
+    
+  	if [ -s $tempfile ]; then
+      rm $tempfile
+      echo "none" # is not running :-)
+      return 1
+  	else
+  	  rm $tempfile      
+  	  echo firefox # is running :-)
       return 0
-    fi
+  	fi    
   fi    # firefox "$1"
   if command -v mozilla &>/dev/null; then
     #if mozilla -remote "ping()" 
     if command mozilla -remote "ping()" &>/dev/null; then
-      echo mozilla # firefox -remote \"openurl("$1",new-tab)\"
+      echo mozilla # is running :-)
       return 0
     fi
   fi
-  echo none
+  echo "none"
   
   return 1
 }
@@ -97,7 +106,7 @@
   fi
 else 
   echo "Launching: $gecko"
-  $gecko -remote "openurl($1,new-tab)" &
+  $gecko -remote "openurl($1)" &
 fi
 
 




More information about the izpack-changes mailing list