Changeset 14247 for gsdl/trunk/bin
- Timestamp:
- 2007-07-12T11:19:16+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/buildcol.pl
r14197 r14247 73 73 74 74 my $arguments = 75 [ { 'name' => "disable_OAI", 76 'desc' => "{buildcol.disable_OAI}", 77 'type' => "flag", 78 'reqd' => "no", 79 'modegli' => "2" }, 80 { 'name' => "remove_empty_classifications", 75 [ { 'name' => "remove_empty_classifications", 81 76 'desc' => "{buildcol.remove_empty_classifications}", 82 77 'type' => "flag", … … 205 200 'type' => "flag", 206 201 'reqd' => "no", 207 'hiddengli' => "yes" } 202 'hiddengli' => "yes" }, 203 { 'name' => "disable_OAI", 204 'desc' => "{buildcol.disable_OAI}", 205 'type' => "flag", 206 'reqd' => "no", 207 'modegli' => "2", 208 'hiddengli' => "yes" } 208 209 209 210 # { 'name' => "incremental_dlc", … … 353 354 unshift (@INC, "$ENV{'GSDLCOLLECTDIR'}/perllib/plugins"); 354 355 355 # read the configuration file (for gs2) 356 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg"); 356 # Read in the collection configuration file. 357 357 my ($collectcfg, $buildtype); 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 { 358 ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 359 if ($gs_mode eq "gs2") { 360 $collectcfg = &colcfg::read_collect_cfg ($configfilename); 361 } elsif ($gs_mode eq "gs3") { 372 362 $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename); 373 $gs_mode = "gs3"; 374 } 375 } 376 363 } 364 377 365 if ($verbosity !~ /\d+/) { 378 366 if (defined $collectcfg->{'verbosity'} && $collectcfg->{'verbosity'} =~ /\d+/) { … … 441 429 $remove_empty_classifications = 1; 442 430 } 443 } 431 } 432 444 433 445 434 if (defined $collectcfg->{'create_images'} && $collectcfg->{'create_images'} =~ /^true$/i) { … … 465 454 $gli = 0 unless defined $gli; 466 455 456 # If the disable_OAI flag is not present, the option $disable_OAI with the value of 0 will be passed to basebuilder.pm 467 457 $disable_OAI = 0 unless defined $disable_OAI; 468 458 469 459 # New argument to track whether build is incremental 470 460 $incremental = 0 unless defined $incremental; … … 537 527 # if a builder class has been created for this collection, use it 538 528 # otherwise, use the mg or mgpp builder 539 if (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/${collection}builder.pm") { 529 if (-e "$ENV{'GSDLCOLLECTDIR'}/custom/${collection}/perllib/custombuilder.pm") { 530 $builderdir = "$ENV{'GSDLCOLLECTDIR'}/custom/${collection}/perllib"; 531 $buildertype = "custombuilder"; 532 } elsif (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/custombuilder.pm") { 533 $builderdir = "$ENV{'GSDLCOLLECTDIR'}/perllib"; 534 $buildertype = "custombuilder"; 535 } elsif (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/${collection}builder.pm") { 540 536 $builderdir = "$ENV{'GSDLCOLLECTDIR'}/perllib"; 541 537 $buildertype = "${collection}builder";
Note:
See TracChangeset
for help on using the changeset viewer.