Changeset 14197 for gsdl/trunk/bin
- Timestamp:
- 2007-06-29T11:39:37+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/buildcol.pl
r14111 r14197 73 73 74 74 my $arguments = 75 [ { 'name' => "remove_empty_classifications", 75 [ { 'name' => "disable_OAI", 76 'desc' => "{buildcol.disable_OAI}", 77 'type' => "flag", 78 'reqd' => "no", 79 'modegli' => "2" }, 80 { 'name' => "remove_empty_classifications", 76 81 'desc' => "{buildcol.remove_empty_classifications}", 77 82 'type' => "flag", … … 268 273 $create_images, $collectdir, $build, $type, $textindex, 269 274 $no_strip_html, $no_text, $faillog, $gli, $index, $language, 270 $sections_index_document_metadata, $maxnumeric, $incremental_dlc); 275 $sections_index_document_metadata, $maxnumeric, $incremental_dlc, 276 $disable_OAI); 271 277 272 278 my $xml = 0; … … 347 353 unshift (@INC, "$ENV{'GSDLCOLLECTDIR'}/perllib/plugins"); 348 354 349 # Read in the collection configuration file. 355 # read the configuration file (for gs2) 356 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg"); 350 357 my ($collectcfg, $buildtype); 351 ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 352 if ($gs_mode eq "gs2") { 353 $collectcfg = &colcfg::read_collect_cfg ($configfilename); 354 } elsif ($gs_mode eq "gs3") { 358 359 if (-e $configfilename) { 360 $collectcfg = &colcfg::read_collect_cfg ($configfilename); 361 $gs_mode = "gs2"; 362 } 363 else { 364 365 # If it is gs3 366 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collectionConfig.xml"); 367 368 if (!-e $configfilename) { 369 &gsprintf($out, "{common.cannot_find_cfg_file}\n", $configfilename) && die; 370 } 371 else { 355 372 $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename); 356 } 357 373 $gs_mode = "gs3"; 374 } 375 } 376 358 377 if ($verbosity !~ /\d+/) { 359 378 if (defined $collectcfg->{'verbosity'} && $collectcfg->{'verbosity'} =~ /\d+/) { … … 422 441 $remove_empty_classifications = 1; 423 442 } 424 } 425 443 } 426 444 427 445 if (defined $collectcfg->{'create_images'} && $collectcfg->{'create_images'} =~ /^true$/i) { … … 446 464 447 465 $gli = 0 unless defined $gli; 466 467 $disable_OAI = 0 unless defined $disable_OAI; 448 468 449 469 # New argument to track whether build is incremental … … 517 537 # if a builder class has been created for this collection, use it 518 538 # otherwise, use the mg or mgpp builder 519 if (-e "$ENV{'GSDLCOLLECTDIR'}/custom/${collection}/perllib/custombuilder.pm") { 520 $builderdir = "$ENV{'GSDLCOLLECTDIR'}/custom/${collection}/perllib"; 521 $buildertype = "custombuilder"; 522 } elsif (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/custombuilder.pm") { 523 $builderdir = "$ENV{'GSDLCOLLECTDIR'}/perllib"; 524 $buildertype = "custombuilder"; 525 } elsif (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/${collection}builder.pm") { 539 if (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/${collection}builder.pm") { 526 540 $builderdir = "$ENV{'GSDLCOLLECTDIR'}/perllib"; 527 541 $buildertype = "${collection}builder"; … … 545 559 "\$maxdocs, \$debug, \$keepold, \$incremental, \$incremental_dlc, " . 546 560 "\$remove_empty_classifications, " . 547 "\$out, \$no_text, \$faillog, \$gli )");561 "\$out, \$no_text, \$faillog, \$gli, \$disable_OAI)"); 548 562 die "$@" if $@; 549 563
Note:
See TracChangeset
for help on using the changeset viewer.