Changeset 20095
- Timestamp:
- 2009-07-29T12:12:24+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/basebuilder.pm
r19218 r20095 52 52 53 53 # used to signify "gs2"(default) or "gs3" 54 my$gs_mode = "gs2";54 our $gs_mode = "gs2"; 55 55 56 56 sub new { … … 84 84 $self->{'gli'} = 0 unless defined $self->{'gli'}; 85 85 86 # disable_O IA applies to greenstone 3 only and is only passed to &colcfg::write_build_cfg_xml (then cfgread4gs3::write_cfg_file) when writing the buildConfig.xml86 # disable_OAI applies to greenstone 3 only and is only passed to &colcfg::write_build_cfg_xml (then buildConfigxml::write_build_cfg_file) when writing the buildConfig.xml 87 87 $self->{'disable_OAI'} = 0 unless defined $self->{'disable_OAI'}; 88 88 … … 642 642 my $self = shift(@_); 643 643 644 my $buildconfigfile = &util::filename_cat($self->{'build_dir'}, "build.cfg"); 644 my $buildconfigfilename; 645 646 if ($gs_mode eq "gs2") { 647 $buildconfigfilename = "build.cfg"; 648 } else { 649 $buildconfigfilename = "buildConfig.xml"; 650 } 651 652 my $buildconfigfile = &util::filename_cat($self->{'build_dir'}, $buildconfigfilename); 645 653 646 654 if (!-e $buildconfigfile) { 647 655 # try the index dir - but do we know where it is?? try here 648 $buildconfigfile = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "index", "build.cfg");656 $buildconfigfile = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "index", $buildconfigfilename); 649 657 if (!-e $buildconfigfile) { 650 658 #we cant find a config file - just ignore the field list … … 652 660 } 653 661 } 654 655 my $buildcfg = &colcfg::read_build_cfg( $buildconfigfile); 656 return $buildcfg; 657 662 if ($gs_mode eq "gs2") { 663 return &colcfg::read_build_cfg( $buildconfigfile); 664 } 665 print STDERR "read build cfg basebuilder***\n"; 666 return &buildConfigxml::read_cfg_file($buildconfigfile); 667 668 658 669 } 659 670
Note:
See TracChangeset
for help on using the changeset viewer.