From e98bcba51edd154e7107e5e5a0d562ce79fdbe0e Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sun, 1 Feb 2009 13:01:12 +0100 Subject: [PATCH] Create non-existing directories --- icons/import/import_oxygen.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/icons/import/import_oxygen.pl b/icons/import/import_oxygen.pl index 16c4116f..8db7d661 100755 --- a/icons/import/import_oxygen.pl +++ b/icons/import/import_oxygen.pl @@ -88,6 +88,8 @@ foreach my $size (keys %req_icons) { opendir (BASEDIR, "$oxygen/$sizestr") or die "Could not open dir for size $size\n"; foreach my $cat (readdir BASEDIR) { next if $cat eq '.' or $cat eq '..'; + system "mkdir -p $output/$sizestr/$cat" and die "Could not create category dir\n"; + system "mkdir -p $output/scalable/$cat" and die "Could not create category dir\n"; opendir (CATDIR, "$oxygen/$sizestr/$cat") or die "Could not open category dir\n"; foreach my $icon (readdir CATDIR) { $icon =~ s/\.png$//; @@ -95,6 +97,7 @@ foreach my $size (keys %req_icons) { $scalables{"$cat/$icon"} = 1; system "cp -a $oxygen/$sizestr/$cat/$icon.png $output/$sizestr/$cat" and die "Error while copying file $sizestr/$cat/$icon.png\n"; + # print "Copy: $oxygen/$sizestr/$cat/$icon.png\n"; delete $req_icons{$size}{$icon}; } closedir CATDIR; -- 2.20.1