From afb847fe966e0b988d9c7bef18a9aee44e302f46 Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Sun, 23 Feb 2003 10:10:22 +0000 Subject: [PATCH 1/1] google/freshmeat search Actions scripts should now work with any configured browser --- ChangeLog.claws | 6 ++++++ tools/freshmeat_search.pl | 6 +++--- tools/google_search.pl | 7 +++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 49aa61fb1..70fa53907 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,9 @@ +2003-02-23 [paul] + + * tools/freshmeat_search.pl + tools/google_search.pl + scripts should now work for any browser/browser command line + 2003-02-22 [christoph] 0.8.10claws45 * src/procmsg.c diff --git a/tools/freshmeat_search.pl b/tools/freshmeat_search.pl index 5ee49453a..292a228db 100644 --- a/tools/freshmeat_search.pl +++ b/tools/freshmeat_search.pl @@ -20,7 +20,7 @@ my $freshmeat = "http://freshmeat.net/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, "; @@ -30,10 +30,10 @@ foreach $rcline (@rclines) { if ($rcline =~ m/^uri_open_command/) { chomp $rcline; @browser = split(/=/, $rcline); - $browser[1] =~ s/ '%s'$//; + $browser[1] =~ s/%s/$freshmeat=$_/; } } -system("$browser[1] '$freshmeat=$_' &"); +system("$browser[1]&"); exit; diff --git a/tools/google_search.pl b/tools/google_search.pl index bf02bf32e..30b190880 100644 --- a/tools/google_search.pl +++ b/tools/google_search.pl @@ -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, "; @@ -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; -- 2.25.1