X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/9a9cbb453427926f2f658734285f6305c7502afb..1b7137c19b38431c79b41d1dfde73ef76f826836:/mr?ds=inline diff --git a/mr b/mr index bb98ba6..4fc7971 100755 --- a/mr +++ b/mr @@ -425,6 +425,8 @@ sub action { #{{{ $config{$topdir}{$subdir}{lib}."\n" : ""; my $is_checkout=($action eq 'checkout'); + $ENV{MR_REPO}=$dir; + if ($is_checkout) { if (-d $dir) { print "mr $action: $dir already exists, skipping checkout\n" if $verbose; @@ -439,8 +441,6 @@ sub action { #{{{ } } - $ENV{MR_REPO}=$dir; - my $skiptest=findcommand("skip", $dir, $topdir, $subdir, $is_checkout); my $command=findcommand($action, $dir, $topdir, $subdir, $is_checkout); @@ -1027,7 +1027,9 @@ sub config { #{{{ } #}}} sub register { #{{{ - if (! $config_overridden) { + if ($config_overridden) { + ($directory)=$ENV{MR_CONFIG}=~/^(.*\/)[^\/]+$/; + } else { # Find the closest known mrconfig file to the current # directory. $directory.="/" unless $directory=~/\/$/;