]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

ensure parent dir exists prior to checkout
authormartin f. krafft <madduck@madduck.net>
Thu, 18 Oct 2007 15:30:30 +0000 (17:30 +0200)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 18 Oct 2007 18:06:53 +0000 (14:06 -0400)
Signed-off-by: martin f. krafft <madduck@madduck.net>
mr

diff --git a/mr b/mr
index d4c3b250f1a6bca1d86454e3998c730f8041d827..b2cb388c072988fccb8cc5b03d4c0315784c7736 100755 (executable)
--- 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) {