use lib 'tools';
require 'utils.pl';
use File::Spec;
-use File::Compare;
-use File::Copy;
+use File::Compare qw(compare);
+use File::Copy qw(copy);
+use File::Path qw(mkpath);
sub main {
while (defined(my $arg = <>)) {
}
else {
print "Copying $saved to $abs...\n";
+ my @path = File::Spec->splitdir($abs);
+ pop @path;
+ mkpath(File::Spec->catdir(@path));
copy($saved, $abs) or die $!;
}
}