Changeset 14022
- Timestamp:
- 2007-04-24T17:13:57+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/basebuilder.pm
r12972 r14022 47 47 our $maxdocsize = 12000; 48 48 49 # used to signify "gs2"(default) or "gs3" 50 my $gs_mode = "gs2"; 51 49 52 sub new { 50 53 my ($class, $collection, $source_dir, $build_dir, $verbosity, … … 79 82 # read in the collection configuration file 80 83 my $colcfgname = "$ENV{'GSDLCOLLECTDIR'}/etc/collect.cfg"; 81 if (!-e $colcfgname) { 84 if (-e $colcfgname) { 85 $self->{'collect_cfg'} = &colcfg::read_collect_cfg ($colcfgname); 86 $gs_mode = "gs2"; 87 } 88 else { 89 my $colcfgname = "$ENV{'GSDLCOLLECTDIR'}/etc/collectionConfig.xml"; 90 if (!-e $colcfgname) { 82 91 die "mgbuilder::new - couldn't find collect.cfg for collection $collection\n"; 83 } 84 $self->{'collect_cfg'} = &colcfg::read_collect_cfg ($colcfgname); 92 } 93 else { 94 $self->{'collect_cfg'} = &colcfg::read_collection_cfg_xml ($colcfgname); 95 $gs_mode = "gs3"; 96 } 97 } 85 98 86 99 # get the list of plugins for this collection … … 447 460 448 461 $self->build_cfg_extra($build_cfg); 449 450 &colcfg::write_build_cfg("$self->{'build_dir'}/build.cfg", $build_cfg); 462 463 if ($gs_mode eq "gs2") { 464 &colcfg::write_build_cfg("$self->{'build_dir'}/build.cfg", $build_cfg); 465 } 466 if ($gs_mode eq "gs3") { 467 &colcfg::write_build_cfg_xml("$self->{'build_dir'}/buildConfig.xml", $build_cfg, $self->{'collect_cfg'}); 468 } 451 469 452 470 print STDERR "</Stage>\n" if $self->{'gli'};
Note:
See TracChangeset
for help on using the changeset viewer.