]> gitweb @ CieloNegro.org - sugar.git/blobdiff - tools/import.pl
Auto commit by The Sugar System.
[sugar.git] / tools / import.pl
index b722db17b651fdeda31fb3717b90e6bb44e536f6..c1bacaebf7824b323969ead4177ba7a715bbe528 100644 (file)
@@ -5,6 +5,7 @@ use lib 'tools';
 require 'utils.pl';
 use File::Spec;
 use File::Copy;
+use File::Path;
 
 sub main {
     my @args = @_;
@@ -15,6 +16,9 @@ sub main {
         my $saved = rel2saved($rel);
 
         print "Copying $abs to $saved...\n";
+        my @path = File::Spec->splitdir($saved);
+        pop @path;
+        mkpath(File::Spec->catdir(@path));
         copy($abs, $saved) or die $!;
     }
 }