Diff for /doc/loncapafiles/removenolongerused.piml between versions 1.4 and 1.17

version 1.4, 2013/08/10 02:31:39 version 1.17, 2024/07/08 23:27:32
Line 1 Line 1
   <!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN"
           "http://lpml.sourceforge.net/DTD/piml.dtd">
   <!-- removenolongerused.piml -->
   
   <!-- $Id$ -->
   
   <!--
   
   This file is part of the LearningOnline Network with CAPA (LON-CAPA).
   
   LON-CAPA is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   
   LON-CAPA is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with LON-CAPA; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   
   /home/httpd/html/adm/gpl.txt
   
   http://www.lon-capa.org/
   
   -->
 <piml>  <piml>
 <targetroot>/</targetroot>  <targetroot>/</targetroot>
 <files>  <files>
Line 14  my %paths = ( Line 43  my %paths = (
               'apache'     =&gt; '/home/httpd/lib/perl/Apache',                'apache'     =&gt; '/home/httpd/lib/perl/Apache',
               'londocroot' =&gt; '/home/httpd/html',                'londocroot' =&gt; '/home/httpd/html',
               'rcgifs'     =&gt; '/home/httpd/html/res/adm/pages',                'rcgifs'     =&gt; '/home/httpd/html/res/adm/pages',
                 'debug'      =&gt; '/home/httpd/perl/debug',
             );              );
     
 my %files = (  my %files = (
               'londaemons' =&gt; ['lonManage','lchtmldir','lonhttpd','lcuseradd'],                'londaemons' =&gt; ['lonManage','lchtmldir','lonhttpd','lcuseradd','lonc'],
               'apache'     =&gt; ['londropadd.pm','lonconstruct.pm',                'apache'     =&gt; ['londropadd.pm','lonconstruct.pm',
                                'lonremote.pm','admbookmarks.pm'],                                 'lonremote.pm','admbookmarks.pm','lonassignments.pm'],
               'londocroot' =&gt; ['adm/rat/extpickcode.html',                'londocroot' =&gt; ['adm/rat/extpickcode.html',
                                'adm/rat/extpickframe.html',                                 'adm/rat/extpickframe.html',
                                'res/adm/pages/imgmaps.html',                                 'res/adm/pages/imgmaps.html',
                                'res/adm/pages/menu.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'      =&gt; ['archive_coursedata_tables.pl'],
             );              );
   
 my %dirs = (  my %dirs = (
               'londocroot' =&gt; 'adm/lonLCDfont',                'londocroot' =&gt; ['adm/lonLCDfont',
                               'htmlarea',                                    'htmlarea',
                               'res/adm/pages/bookmarkmenu',                                    'res/adm/pages/bookmarkmenu',
                                     'res/adm/pages/reactionresponse',
                                     'adm/jsMath',
                                     'adm/jQuery/css/ui-lightness'],
            );             );
   
 my %multis = (  my %multis = (
                  rcgifs'     =&gt; \@rcgifs,                  'rcgifs'     =&gt; \@rcgifs,
              );                ); 
 my @filestodelete = ();  my @filestodelete = ();
 my @dirstodelete = ();  my @dirstodelete = ();
Line 44  foreach my $key (sort(keys(%files))) { Line 94  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 56  foreach my $key (sort(keys(%dirs))) { Line 106  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 86  if (@dirstodelete > 0) { Line 136  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);
         }          }
     }      }
 }  }
Line 115  if (@multistodelete > 0) { Line 165  if (@multistodelete > 0) {
     $choice =~ s/\s+//g;      $choice =~ s/\s+//g;
     if ($choice eq 'Y') {      if ($choice eq 'Y') {
         foreach my $item (@multistodelete) {          foreach my $item (@multistodelete) {
             next if ((($item =~/\*/) || ($item eq '') || ($item eq '/'));              next if (($item =~/\*/) || ($item eq '') || ($item eq '/'));
             unlink($item);              unlink($item);
         }          }
     }      }

Removed from v.1.4  
changed lines
  Added in v.1.17


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>