From 51a00c77d7d399ee5bc7493d03d374fc0312975a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Oct 2007 03:50:45 -0400 Subject: [PATCH] include the lib code when running skip tests --- mr | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mr b/mr index ab71f36..f8b78c0 100755 --- a/mr +++ b/mr @@ -208,6 +208,9 @@ foreach my $topdir (sort keys %config) { sub action { my ($action, $dir, $topdir, $subdir) = @_; + + my $lib= exists $config{$topdir}{$subdir}{lib} ? + $config{$topdir}{$subdir}{lib} : ""; if ($action eq 'checkout') { if (-d $dir) { @@ -229,7 +232,7 @@ sub action { } if (exists $config{$topdir}{$subdir}{skip}) { - my $ret=system($config{$topdir}{$subdir}{skip}); + my $ret=system($lib.$config{$topdir}{$subdir}{skip}); if ($ret >> 8 == 0) { print "mr $action: $dir skipped per config file\n" if $verbose; push @skipped, $dir; @@ -243,9 +246,7 @@ sub action { } else { print "mr $action: in $dir\n"; - my $command="set -e; ". - (exists $config{$topdir}{$subdir}{lib} ? - $config{$topdir}{$subdir}{lib} : ""). + my $command="set -e; ".$lib. "my_action(){ $config{$topdir}{$subdir}{$action} ; }; my_action ". join(" ", map { s/\//\/\//g; s/"/\"/g; '"'.$_.'"' } @ARGV); my $ret=system($command); -- 2.39.5