google/freshmeat search Actions scripts should now work with any configured browser
[claws.git] / tools / google_search.pl
index bf02bf32eac9ad706640d046187520163c16ed2c..30b19088009c0f3dcc3939dd465ce69a1fb0b9a6 100644 (file)
@@ -20,7 +20,7 @@
 my $google = "http://www.google.com/search?q";
 $_ = <>;
 
-chdir($ENV{HOME} . "/.sylpheed") or die("Can't find your .sylpheed directory\n");
+chdir($ENV{HOME} . "/.sylpheed") || die("Can't find your .sylpheed directory\n");
 
 open (SYLRC, "<sylpheedrc") || die("Can't open the sylpheedrc file\n");
        @rclines = <SYLRC>;
@@ -30,11 +30,10 @@ foreach $rcline (@rclines) {
        if ($rcline =~ m/^uri_open_command/) {
                chomp $rcline;
                @browser = split(/=/, $rcline);
-               $browser[1] =~ s/ '%s'$//;
+               $browser[1] =~ s/%s/$google=$_/;
        }
 }
-
-system("$browser[1] '$google=$_' &");
+system("$browser[1]&");
 
 exit;