Changeset 1586
- Timestamp:
- 2000-10-05T15:10:41+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/util.pm
r1454 r1586 196 196 197 197 } elsif (-d $file) { 198 print STDERR "directory: $file\n"; 198 # make the new directory 199 my ($filename) = $file =~ /([^\\\/]*)$/; 200 $dest = &util::filename_cat ($dest, $filename); 201 my $store_umask = umask(0002); 202 mkdir ($dest, 0777); 203 umask($store_umask); 199 204 200 205 # get the contents of this directory … … 204 209 my @filedir = readdir (INDIR); 205 210 closedir (INDIR); 206 my $olddest = $dest;207 211 foreach $f (@filedir) { 208 212 next if $f =~ /^\.\.?$/; 209 213 # copy all the files in this directory 210 214 my $ff = &util::filename_cat ($file, $f); 211 if (-d $ff) {212 # make the new directory213 $dest = &util::filename_cat ($dest, $f);214 my $store_umask = umask(0002);215 mkdir ($dest, 0777);216 umask($store_umask);217 }218 print STDERR "dest: $dest\n";219 215 &cp_r ($ff, $dest); 220 $dest = $olddest;221 216 } 222 217 } 223 218 224 219 } else { 225 print STDERR "ordinary file: $file --> $dest\n";226 220 &cp($file, $dest); 227 221 }
Note:
See TracChangeset
for help on using the changeset viewer.