Subversion Repositories sysadmin_scripts

Rev

Rev 18 | Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18 Rev 19
Line 83... Line 83...
83
 
83
 
84
# simply read the entire file into a string
84
# simply read the entire file into a string
85
sub slurpFile {
85
sub slurpFile {
86
   my $filename = shift;
86
   my $filename = shift;
87
   return '' unless -e $filename;
87
   return '' unless -e $filename;
88
   open TEMP, "<$filename" or die "could not read $filename: $!\n";
88
   open TEMP, "<'$filename'" or die "could not read $filename: $!\n";
89
   my @contents = <TEMP>;
89
   my @contents = <TEMP>;
90
   close TEMP;
90
   close TEMP;
91
   return join( '', @contents );
91
   return join( '', @contents );
92
}
92
}
93
 
93
 
Line 258... Line 258...
258
   }
258
   }
259
   print "You should remove the following files\n" if $DEBUG > 1;
259
   print "You should remove the following files\n" if $DEBUG > 1;
260
   foreach my $thisDir ( @toRemove ) {
260
   foreach my $thisDir ( @toRemove ) {
261
      $thisDir =~ m/(.*)\.$md5Suffix/;
261
      $thisDir =~ m/(.*)\.$md5Suffix/;
262
      $thisDir = $1;
262
      $thisDir = $1;
263
      qx/rm -fR $thisDir $thisDir.$md5Suffix/;
263
      qx/rm -fR '$thisDir' '$thisDir.$md5Suffix'/;
264
   }
264
   }
265
}
265
}
266
 
266
 
267
 
267
 
268
 
268