diff options
Diffstat (limited to 'notmuch-slurp-debbug')
-rwxr-xr-x | notmuch-slurp-debbug | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/notmuch-slurp-debbug b/notmuch-slurp-debbug index f555329..09d05c1 100755 --- a/notmuch-slurp-debbug +++ b/notmuch-slurp-debbug @@ -25,6 +25,7 @@ use File::Spec::Functions 'catfile'; use File::Which; use File::Temp; use Getopt::Long; +use IPC::System::Simple qw(systemx capturex); use MIME::Head; my $Config = Config::Tiny->new; @@ -67,7 +68,7 @@ my $bts_server_arg = defined $bts_server : undef; # see #904182 (try using this script ;)) -system(grep defined, "bts", $bts_server_arg, +systemx(grep defined, "bts", $bts_server_arg, qw(--mbox --mailreader), "true %s", "show", $bug) == 0 or die "notmuch-slurp-debbug: bts failed"; @@ -85,7 +86,7 @@ my $mbox = catfile $devscripts_cache, "$bug.mbox"; # note that mb2md won't work; it thinks Debian BTS mboxes contain just # a single message -system("mbox2maildir", $mbox, $dir) == 0 +systemx("mbox2maildir", $mbox, $dir) == 0 or die "notmuch-slurp-debbug: mbox2maildir failed"; foreach my $message (glob "$dir/*/*") { @@ -95,9 +96,9 @@ foreach my $message (glob "$dir/*/*") { # that is asking for trouble next unless defined $mid; $mid =~ s/(<|>)//g; - my $match = `notmuch search id:$mid`; + my $match = capturex(qw(notmuch search), "id:$mid"); my $match_lines = $match =~ tr/\n//; - system("mdmv", $message, $maildir) if ($match_lines == 0); + systemx("mdmv", $message, $maildir) if ($match_lines == 0); } -system(qw(notmuch new)); +systemx(qw(notmuch new)); |