--- doc/loncapafiles/removenolongerused.piml 2013/08/31 00:25:58 1.6 +++ doc/loncapafiles/removenolongerused.piml 2024/07/08 23:27:32 1.17 @@ -1,3 +1,32 @@ + + + + + + / @@ -14,6 +43,7 @@ my %paths = ( 'apache' => '/home/httpd/lib/perl/Apache', 'londocroot' => '/home/httpd/html', 'rcgifs' => '/home/httpd/html/res/adm/pages', + 'debug' => '/home/httpd/perl/debug', ); my %files = ( @@ -24,17 +54,37 @@ my %files = ( 'adm/rat/extpickframe.html', 'res/adm/pages/imgmaps.html', 'res/adm/pages/menu.html', - 'res/adm/pages/homeworkmenu.html'], + 'res/adm/pages/homeworkmenu.html', + 'adm/help/gif/vbkm.gif', + 'adm/help/eps/vbkm.eps', + 'adm/jQuery/js/jquery-1.3.2.min.js', + 'adm/jQuery/js/jquery-1.6.2.min.js', + 'adm/jQuery/js/jquery-1.11.3.min.js', + 'adm/jQuery/js/jquery-3.2.1.min.js', + 'adm/jQuery/js/jquery-ui-1.7.2.custom.min.js', + 'adm/jQuery/js/jquery-ui-1.8.16.custom.min.js', + 'adm/jQuery/js/jquery-ui-1.11.4.custom.min.js', + 'adm/jQuery/js/jquery-ui-1.12.1.custom.min.js', + 'adm/jQuery/css/smoothness/jquery-ui-1.7.2.custom.css', + 'adm/jQuery/css/smoothness/jquery-ui-1.8.16.custom.css', + 'adm/jQuery/js/css/smoothness/jquery-ui-1.11.4.custom.css', + 'adm/jQuery/js/css/smoothness/jquery-ui-1.12.1.custom.min.css', + 'adm/reactionresponse/reaction_frame.html', + 'adm/reactionresponse/reaction_window.html'], + 'debug' => ['archive_coursedata_tables.pl'], ); my %dirs = ( - 'londocroot' => 'adm/lonLCDfont', - 'htmlarea', - 'res/adm/pages/bookmarkmenu', + 'londocroot' => ['adm/lonLCDfont', + 'htmlarea', + 'res/adm/pages/bookmarkmenu', + 'res/adm/pages/reactionresponse', + 'adm/jsMath', + 'adm/jQuery/css/ui-lightness'], ); my %multis = ( - rcgifs' => \@rcgifs, + 'rcgifs' => \@rcgifs, ); my @filestodelete = (); my @dirstodelete = (); @@ -44,7 +94,7 @@ foreach my $key (sort(keys(%files))) { if ($paths{$key} ne '') { if (ref($files{$key}) eq 'ARRAY') { foreach my $file (@{$files{$key}}) { - if (-f $paths{$key}.'/'.$file) { + if (($file ne '') && (-f $paths{$key}.'/'.$file)) { push(@filestodelete,$paths{$key}.'/'.$file); } } @@ -56,7 +106,7 @@ foreach my $key (sort(keys(%dirs))) { if ($paths{$key} ne '') { if (ref($dirs{$key}) eq 'ARRAY') { foreach my $dir (@{$dirs{$key}}) { - if (-d $paths{$key}.'/'.$dir) { + if (($dir ne '') && (-d $paths{$key}.'/'.$dir)) { push(@dirstodelete,$paths{$key}.'/'.$dir); } } @@ -86,7 +136,7 @@ if (@dirstodelete > 0) { chomp($choice); $choice =~ s/\s+//g; if ($choice eq 'Y') { - File::Path::remove_tree($dir); + File::Path::rmtree($dir); } } } @@ -115,7 +165,7 @@ if (@multistodelete > 0) { $choice =~ s/\s+//g; if ($choice eq 'Y') { foreach my $item (@multistodelete) { - next if ((($item =~/\*/) || ($item eq '') || ($item eq '/')); + next if (($item =~/\*/) || ($item eq '') || ($item eq '/')); unlink($item); } }