X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/f7ed26bbe30b1c38e2c9767bff9c791631713fe7..2467756e9e048a4579ee65c9980672316e12ee24:/mr diff --git a/mr b/mr index 61e2102..97720d4 100755 --- a/mr +++ b/mr @@ -755,6 +755,9 @@ sub hook { print STDERR "mr $hook: received signal ".($? & 127)."\n"; return ABORT; } + else { + return FAILED; + } } return OK; @@ -1235,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"; - } } } } @@ -1258,8 +1266,8 @@ sub loadconfig { } } - foreach (@toload) { - loadconfig($_); + foreach my $c (@toload) { + loadconfig(@$c); } }