From c9232098307b1ba10076781bfc7794d133c2236e Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 18 Oct 2007 17:30:30 +0200 Subject: [PATCH 1/1] ensure parent dir exists prior to checkout Signed-off-by: martin f. krafft --- mr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mr b/mr index d4c3b25..b2cb388 100755 --- a/mr +++ b/mr @@ -426,7 +426,12 @@ sub action { #{{{ push @skipped, $dir; return; } + $dir=~s/^(.*)\/[^\/]+\/?$/$1/; + if (! -d $dir) { + print "mr $action: creating parent directory $dir\n" if $verbose; + mkdir $dir; + } } elsif ($action eq 'update') { if (! -d $dir) { -- 2.39.5