version 1.9, 2014/06/20 19:01:02
|
version 1.13, 2016/02/20 00:12:54
|
Line 32 my %files = (
|
Line 32 my %files = (
|
); |
); |
|
|
my %dirs = ( |
my %dirs = ( |
'londocroot' => 'adm/lonLCDfont', |
'londocroot' => ['adm/lonLCDfont', |
'htmlarea', |
'htmlarea', |
'res/adm/pages/bookmarkmenu', |
'res/adm/pages/bookmarkmenu', |
|
'res/adm/pages/reactionresponse', |
|
'adm/jsMath'], |
); |
); |
|
|
my %multis = ( |
my %multis = ( |
Line 48 foreach my $key (sort(keys(%files))) {
|
Line 50 foreach my $key (sort(keys(%files))) {
|
if ($paths{$key} ne '') { |
if ($paths{$key} ne '') { |
if (ref($files{$key}) eq 'ARRAY') { |
if (ref($files{$key}) eq 'ARRAY') { |
foreach my $file (@{$files{$key}}) { |
foreach my $file (@{$files{$key}}) { |
if (-f $paths{$key}.'/'.$file) { |
if (($file ne '') && (-f $paths{$key}.'/'.$file)) { |
push(@filestodelete,$paths{$key}.'/'.$file); |
push(@filestodelete,$paths{$key}.'/'.$file); |
} |
} |
} |
} |
Line 60 foreach my $key (sort(keys(%dirs))) {
|
Line 62 foreach my $key (sort(keys(%dirs))) {
|
if ($paths{$key} ne '') { |
if ($paths{$key} ne '') { |
if (ref($dirs{$key}) eq 'ARRAY') { |
if (ref($dirs{$key}) eq 'ARRAY') { |
foreach my $dir (@{$dirs{$key}}) { |
foreach my $dir (@{$dirs{$key}}) { |
if (-d $paths{$key}.'/'.$dir) { |
if (($dir ne '') && (-d $paths{$key}.'/'.$dir)) { |
push(@dirstodelete,$paths{$key}.'/'.$dir); |
push(@dirstodelete,$paths{$key}.'/'.$dir); |
} |
} |
} |
} |
Line 90 if (@dirstodelete > 0) {
|
Line 92 if (@dirstodelete > 0) {
|
chomp($choice); |
chomp($choice); |
$choice =~ s/\s+//g; |
$choice =~ s/\s+//g; |
if ($choice eq 'Y') { |
if ($choice eq 'Y') { |
File::Path::remove_tree($dir); |
File::Path::rmtree($dir); |
} |
} |
} |
} |
} |
} |