--- doc/loncapafiles/removenolongerused.piml 2013/08/10 03:13:01 1.1.2.3 +++ doc/loncapafiles/removenolongerused.piml 2014/06/20 19:25:41 1.1.2.7 @@ -11,19 +11,23 @@ my %paths = ( 'londaemons' => '/home/httpd/perl', 'apache' => '/home/httpd/lib/perl/Apache', 'londocroot' => '/home/httpd/html', + 'debug' => '/home/httpd/perl/debug', ); my %files = ( - 'londaemons' => ['lonManage','lchtmldir','lonhttpd','lcuseradd'], + 'londaemons' => ['lonManage','lchtmldir','lonhttpd','lcuseradd','lonc'], 'apache' => ['londropadd.pm','lonconstruct.pm', - 'admbookmarks.pm'], + 'admbookmarks.pm','lonassignments.pm'], 'londocroot' => ['adm/rat/extpickcode.html', - 'adm/rat/extpickframe.html'], + 'adm/rat/extpickframe.html', + 'adm/help/gif/vbkm.gif', + 'adm/help/eps/vbkm.eps'], + 'debug' => ['archive_coursedata_tables.pl'], ); my %dirs = ( - 'londocroot' => 'htmlarea', - 'res/adm/pages/bookmarkmenu', + 'londocroot' => ['htmlarea', + 'res/adm/pages/bookmarkmenu'], ); my @filestodelete = (); @@ -32,7 +36,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); } } @@ -44,7 +48,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); } }