X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/e2ccc21918b8a4bdfecc4a8e078f36d8b1b164a0..677f2c478ccc89aa2f30c4407e26bc568d8b5532:/mr diff --git a/mr b/mr index d3c79ac..fc63605 100755 --- a/mr +++ b/mr @@ -602,7 +602,7 @@ sub action { my $is_checkout=($action eq 'checkout'); my $is_update=($action =~ /update/); - $ENV{MR_REPO}=$dir; + ($ENV{MR_REPO}=$dir) =~ s!/$!!; $ENV{MR_ACTION}=$action; foreach my $testname ("skip", "deleted") { @@ -946,7 +946,10 @@ sub repodir { return $ret; } -# figure out which repos to act on +# Figure out which repos to act on. Returns a list of array refs +# in the format: +# +# [ "$full_repo_path/", "$mr_config_path/", $section_header ] sub selectrepos { my @repos; foreach my $repo (repolist()) { @@ -1298,7 +1301,7 @@ sub loadconfig { if ($parameter eq 'chain' && length $dir && $section ne "DEFAULT") { my $chaindir="$section"; - if ($chaindir !~ m!/!) { + if ($chaindir !~ m!^/!) { $chaindir=$dir.$chaindir; } if (-e "$chaindir/.mrconfig") {