Changeset 12844 for trunk/gsdl/perllib/basebuildproc.pm
- Timestamp:
- 2006-09-25T14:17:10+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/basebuildproc.pm
r11994 r12844 40 40 } 41 41 42 sub new {43 my ($class, $collection, $source_dir, $build_dir, $keepold,44 $verbosity, $outhandle) = @_; 42 sub new() 43 { 44 my ($class, $collection, $source_dir, $build_dir, $keepold, $verbosity, $outhandle) = @_; 45 45 my $self = new docproc (); 46 46 … … 71 71 # For incremental building need to seed num_docs etc from values 72 72 # stored in build.cfg (if present) 73 73 print STDERR "Keepold!\n"; 74 74 $buildconfigfile = &util::filename_cat($build_dir, "build.cfg"); 75 75 print STDERR "Build cfg: $buildconfigfile\n"; 76 76 if (-e $buildconfigfile) { 77 77 $found_num_data = 1; … … 81 81 $buildconfigfile = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, 82 82 "index", "build.cfg"); 83 print STDERR "Index cfg: $buildconfigfile\n"; 83 84 if (-e $buildconfigfile) { 84 85 $found_num_data = 1; … … 86 87 } 87 88 88 } 89 90 if ($found_num_data) { 89 } 90 #else 91 # { 92 # print STDERR "Removeold!\n"; 93 # } 94 95 if ($found_num_data) 96 { 97 #print STDERR "Found_Num_Data!\n"; 91 98 my $buildcfg = &colcfg::read_build_cfg($buildconfigfile); 92 93 99 $self->{'starting_num_docs'} = $buildcfg->{'numdocs'}; 100 #print STDERR "- num_docs: $self->{'starting_num_docs'}\n"; 94 101 $self->{'starting_num_sections'} = $buildcfg->{'numsections'}; 102 #print STDERR "- num_sections: $self->{'starting_num_sections'}\n"; 95 103 $self->{'starting_num_bytes'} = $buildcfg->{'numbytes'}; 96 } 97 else { 98 $self->{'starting_num_docs'} = 0; 104 #print STDERR "- num_bytes: $self->{'starting_num_bytes'}\n"; 105 } 106 else 107 { 108 #print STDERR "NOT Found_Num_Data!\n"; 109 $self->{'starting_num_docs'} = 0; 99 110 $self->{'starting_num_sections'} = 0; 100 111 $self->{'starting_num_bytes'} = 0; 101 }112 } 102 113 103 114 $self->{'output_handle'} = "STDOUT"; … … 428 439 # output the matching document number 429 440 print $handle "<docnum>$self->{'num_docs'}\n"; 441 430 442 } else { 431 443 # output a list of children … … 612 624 } 613 625 614 sub assoc_files {626 sub assoc_files() { 615 627 my $self = shift (@_); 616 628 my ($doc_obj, $archivedir) = @_; … … 618 630 619 631 foreach my $assoc_file (@{$doc_obj->get_assoc_files()}) { 632 #rint STDERR "Processing associated file - copy " . $assoc_file->[0] . " to " . $assoc_file->[1] . "\n"; 620 633 # if assoc file starts with a slash, we put it relative to the assoc 621 634 # dir, otherwise it is relative to the HASH... directory 622 635 if ($assoc_file->[1] =~ m@^[/\\]@) { 623 $afile = &util::filename_cat($self->{'assocdir'}, $assoc_file->[1]);636 $afile = &util::filename_cat($self->{'assocdir'}, $assoc_file->[1]); 624 637 } else { 625 638 $afile = &util::filename_cat($self->{'assocdir'}, $archivedir, $assoc_file->[1]);
Note:
See TracChangeset
for help on using the changeset viewer.