Changeset 2566 for trunk/gsdl/bin/script
- Timestamp:
- 2001-06-19T13:01:40+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/build
r2488 r2566 168 168 print STDOUT " -out Filename or handle to print output status to.\n"; 169 169 print STDOUT " The default is STDERR\n"; 170 print STDOUT " -make_writable If set build will make the collection and any\n"; 171 print STDOUT " temporary files it created globally writable after\n"; 172 print STDOUT " it finishes\n"; 170 173 print STDOUT " -log_events Log important events (collection built successfully\n"; 171 174 print STDOUT " etc.) to event_log_file\n"; … … 548 551 'save_archives', \$save_archives, 549 552 'out/.*/STDERR', \$out, 553 'make_writable', \$make_writable, 550 554 'log_events', \$log_events, 551 555 'event_log_file/.*/', \$event_log_file, … … 558 562 } 559 563 } 564 565 566 END { 567 568 if ($make_writable) { 569 # chmod a+rw new collection 570 my $installed_collection = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection); 571 &recursive_chmod($installed_collection); 572 573 # chmod a+rw anything we've left laying about in the tmp directory 574 if (($collectdir ne "") && 575 (!&util::filenames_equal ($collectdir, &util::filename_cat($ENV{'GSDLHOME'}, "collect")))) { 576 &recursive_chmod($collectdir); 577 } 578 } 579 580 sub recursive_chmod { 581 my ($dir) = @_; 582 return unless -d $dir; 583 584 chmod (0777, $dir); 585 586 opendir (DIR, $dir) || die; 587 my @files = readdir DIR; 588 closedir DIR; 589 590 foreach my $file (@files) { 591 next if $file =~ /^\.\.?$/; 592 $file = &util::filename_cat($dir, $file); 593 if (-d $file) { 594 &recursive_chmod ($file); 595 } else { 596 chmod (0777, $file); 597 } 598 } 599 } 600 }
Note:
See TracChangeset
for help on using the changeset viewer.