Diff for /doc/loncapafiles/removenolongerused.piml between versions 1.1 and 1.2

version 1.1, 2013/08/07 18:20:22 version 1.2, 2013/08/09 06:24:21
Line 5 Line 5
 <target dist="default"></target>  <target dist="default"></target>
 <perlscript mode="fg">  <perlscript mode="fg">
   
 use File::Path qw(remove_tree);  use File::Path();
   
 my @rcgifs = qw(anno.gif anot.gif anot2.gif back.gif bchat.gif bkm.gif blog.gif brws.gif catalog.gif ccat.gif ccrs.gif chrt.gif clst.gif com.gif conf.gif courses.gif cprv.gif cstr.gif del.gif docs.gif egrd.gif enrl.gif eval.gif fdbk.gif forw.gif grds.gif grps.gif keys.gif ledsend.gif list.gif logout.gif mail.gif mcrs.gif mrk.gif nav.gif new.gif parm.gif pcsrt.gif pcstr.gif pdfupload.gif pgrd.gif port.gif pparm.gif pref.gif prt.gif pub.gif rcrs.gif reload.gif remotebg.gif res.gif roles.gif rsrv.gif rtrv.gif sbkm.gif sctr.gif spacer.gif sprs.gif src.gif srvr.gif stat.gif subm.gif title.gif vbkm.gif);  my @rcgifs = qw(anno.gif anot.gif anot2.gif back.gif bchat.gif bkm.gif blog.gif brws.gif catalog.gif ccat.gif ccrs.gif chrt.gif clst.gif com.gif conf.gif courses.gif cprv.gif cstr.gif del.gif docs.gif egrd.gif enrl.gif eval.gif fdbk.gif forw.gif grds.gif grps.gif keys.gif ledsend.gif list.gif logout.gif mail.gif mcrs.gif mrk.gif nav.gif new.gif parm.gif pcsrt.gif pcstr.gif pdfupload.gif pgrd.gif port.gif pparm.gif pref.gif prt.gif pub.gif rcrs.gif reload.gif remotebg.gif res.gif roles.gif rsrv.gif rtrv.gif sbkm.gif sctr.gif spacer.gif sprs.gif src.gif srvr.gif stat.gif subm.gif title.gif vbkm.gif);
   
Line 80  foreach my $key (sort(keys(%multis))) { Line 80  foreach my $key (sort(keys(%multis))) {
 if (@dirstodelete > 0) {  if (@dirstodelete > 0) {
     print "\nThe following directories were installed for an earlier version of LON-CAPA, and are no longer needed. It is recommended that you delete them. For each one, enter Y if you would the directory to be deleted.\n\n";      print "\nThe following directories were installed for an earlier version of LON-CAPA, and are no longer needed. It is recommended that you delete them. For each one, enter Y if you would the directory to be deleted.\n\n";
     foreach my $dir (@dirstodelete) {      foreach my $dir (@dirstodelete) {
         next if (($dir =~/*/) || ($dir eq '') || ($dir eq '/'));            next if (($dir =~/\*/) || ($dir eq '') || ($dir eq '/'));  
         print "$dir  -- delete? Enter: Y or N:\n";          print "$dir  -- delete? Enter: Y or N:\n";
         my $choice=&lt;&gt;;          my $choice=&lt;&gt;;
         chomp($choice);          chomp($choice);
         if ($choice==Y) {          $choice =~ s/\s+//g; 
             remove_tree($dir);          if ($choice eq 'Y') {
               File::Path::remove_tree($dir);
         }          }
     }      }
 }  }
Line 93  if (@dirstodelete > 0) { Line 94  if (@dirstodelete > 0) {
 if (@filestodelete > 0) {  if (@filestodelete > 0) {
    print "\nThe following files were installed for an earlier version of LON-CAPA, and are no longer needed. It is recommended that you delete them. For each one, enter Y if you would the file to be deleted.\n\n";     print "\nThe following files were installed for an earlier version of LON-CAPA, and are no longer needed. It is recommended that you delete them. For each one, enter Y if you would the file to be deleted.\n\n";
     foreach my $file (@filestodelete) {      foreach my $file (@filestodelete) {
         next if (($file =~/*/) || ($file eq '') || ($file eq '/'));          next if (($file =~/\*/) || ($file eq '') || ($file eq '/'));
         print "$file -- remove? Enter? Y or N:\n";          print "$file -- remove? Enter? Y or N:\n";
         my $choice=&lt;&gt;;          my $choice=&lt;&gt;;
         chomp($choice);          chomp($choice);
         if ($choice==Y) {          $choice =~ s/\s+//g;
           if ($choice eq 'Y') {
             unlink($file);              unlink($file);
         }          }
     }      }
Line 110  if (@multistodelete > 0) { Line 112  if (@multistodelete > 0) {
           "Remove? Y or N:\n";            "Remove? Y or N:\n";
     my $choice=&lt;&gt;;      my $choice=&lt;&gt;;
     chomp($choice);      chomp($choice);
     if ($choice==Y) {      $choice =~ s/\s+//g;
       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.1  
changed lines
  Added in v.1.2


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