X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/4cda4e5c360d4cd0cd33ef8b3bd2cd55eb50b583..72a0284da93c97d390bcc9a0b0b04d0c77f9f281:/mr?ds=sidebyside diff --git a/mr b/mr index aa15728..c15b3a3 100755 --- a/mr +++ b/mr @@ -128,8 +128,9 @@ foreach my $topdir (sort keys %config) { my $dir=$topdir.$subdir; if (defined $directory && + $dir ne $directory && $dir !~ /^\Q$directory\E\//) { - print "mr $action: $dir skipped per -d parameter\n" if $verbose; + print "mr $action: $dir skipped per -d parameter ($directory)\n" if $verbose; push @skipped, $dir; next; } @@ -193,7 +194,7 @@ sub showstat { return; } print "\nmr $action: finished (".join("; ", - showstat($#successes+1, "success", "sucesses"), + showstat($#successes+1, "success", "successes"), showstat($#failures+1, "failure", "failures"), showstat($#skipped+1, "skipped", "skipped"), ).")\n"; @@ -212,16 +213,17 @@ sub loadconfig { $dir=""; } else { - $f=abs_path($f); - - if ($loaded{$f}) { + # $f might be a symlink + my $absf=abs_path($f); + if ($loaded{$absf}) { return; } - $loaded{$f}=1; + $loaded{$absf}=1; print "mr: loading config $f\n" if $verbose; open($in, "<", $f) || die "mr: open $f: $!\n"; ($dir)=$f=~/^(.*\/)[^\/]+$/; + $dir=abs_path($dir)."/"; # copy in defaults from first parent my $parent=$dir;