Changeset 19899


Ignore:
Timestamp:
2009-06-24T14:21:44+12:00 (15 years ago)
Author:
kjdon
Message:

modified to look for buildConfig.xml if gs3 mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/incremental-buildcol.pl

    r19743 r19899  
    107107    my $quoted_argv = join(" ", map { "\"$_\"" } @filtered_argv);
    108108   
    109     my $build_cfg_filename = &util::filename_cat($build_dir,"build.cfg");
    110 
    111109    my $buildcol_cmd = "buildcol.pl";
    112110    if($ENV{'GSDLOS'} =~ m/windows/) {
     
    119117    }
    120118
     119    if ((&colcfg::use_collection($site, $collect, $collect_dir)) eq "") {
     120    print STDERR "Unable to use collection \"$collect\" within \"$collect_dir\"\n";
     121    exit -1;
     122    }
     123    # Read in the collection configuration file.
     124    my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR);
     125   
     126    my $collectcfg = &colcfg::read_collection_cfg ($collect_cfg_filename,$gs_mode);
     127
     128    # look for build.cfg/buildConfig.xml
     129    my $build_cfg_filename ="";
     130
     131    if ($gs_mode eq "gs2") {
     132    $build_cfg_filename = &util::filename_cat($build_dir,"build.cfg");
     133    } else {
     134    $build_cfg_filename = &util::filename_cat($build_dir, "buildConfig.xml");
     135    }
     136   
    121137    if (-e $build_cfg_filename) {
    122138
     
    124140    # (e.g. collect.cfg now says lucene, but build.cfg says mgpp)
    125141
    126     if ((&colcfg::use_collection($site, $collect, $collect_dir)) eq "") {
    127         print STDERR "Unable to use collection \"$collect\" within \"$collect_dir\"\n";
    128         exit -1;
     142    my $buildcfg;
     143    if ($gs_mode eq "gs2") {
     144        $buildcfg = &colcfg::read_build_cfg ($build_cfg_filename);
     145    } else {
     146        $buildcfg = &colcfg::read_collection_cfg_xml($build_cfg_filename);
    129147    }
    130     # Read in the collection configuration file.
    131     my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR);
    132     my $collectcfg = &colcfg::read_collection_cfg ($collect_cfg_filename,$gs_mode);
    133 
    134     my $buildcfg = &colcfg::read_build_cfg ($build_cfg_filename);
    135 
    136148    if ($buildcfg->{'buildtype'} ne $collectcfg->{'buildtype'}) {
    137149        print STDERR "*****\n";
Note: See TracChangeset for help on using the changeset viewer.