X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/87aeee89afd99df4c3d15ba53e18ecf66deb96dd..c8088cf4d74fb8f48e8acf1784912727cdbc53fb:/mr?ds=sidebyside diff --git a/mr b/mr index d4c3b25..8e845a9 100755 --- a/mr +++ b/mr @@ -426,7 +426,13 @@ sub action { #{{{ push @skipped, $dir; return; } + $dir=~s/^(.*)\/[^\/]+\/?$/$1/; + + if (! -d $dir) { + print "mr $action: creating parent directory $dir\n" if $verbose; + my $ret=system("mkdir", "-p", $dir); + } } elsif ($action eq 'update') { if (! -d $dir) {