X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/64e5b9721264d0d08f6348b61d7ca98f5fbea5c6..2467756e9e048a4579ee65c9980672316e12ee24:/mr diff --git a/mr b/mr index 74b1cfc..97720d4 100755 --- a/mr +++ b/mr @@ -1238,21 +1238,26 @@ sub loadconfig { $knownactions{$parameter}=1; } if ($parameter eq 'chain' && - length $dir && $section ne "DEFAULT" && - -e $dir.$section."/.mrconfig") { - my $ret=system($value); - if ($ret != 0) { - if (($? & 127) == 2) { - print STDERR "mr: chain test interrupted\n"; - exit 2; + length $dir && $section ne "DEFAULT") { + my $chaindir="$section"; + if ($chaindir !~ m!/!) { + $chaindir=$dir.$chaindir; + } + if (-e "$chaindir/.mrconfig") { + my $ret=system($value); + if ($ret != 0) { + if (($? & 127) == 2) { + print STDERR "mr: chain test interrupted\n"; + exit 2; + } + elsif ($? & 127) { + print STDERR "mr: chain test received signal ".($? & 127)."\n"; + } } - elsif ($? & 127) { - print STDERR "mr: chain test received signal ".($? & 127)."\n"; + else { + push @toload, ["$chaindir/.mrconfig", $chaindir]; } } - else { - push @toload, $dir.$section."/.mrconfig"; - } } } } @@ -1261,8 +1266,8 @@ sub loadconfig { } } - foreach (@toload) { - loadconfig($_); + foreach my $c (@toload) { + loadconfig(@$c); } }