Changeset 26322


Ignore:
Timestamp:
2012-10-16T15:59:53+13:00 (12 years ago)
Author:
ak19
Message:

buildConfig.xml created at g2f-buildcol's end for a new fedora collection. Kathy thinks this may be better (because easier to do) than adjust the collConfig.xml to contain the same.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/g2f-buildcol.pl

    r26183 r26322  
    377377
    378378   
     379    # for the Greenstone reader interface to make the new Fedora collection available,
     380    # need to write out buildConfig.xml with FedoraServiceProxy as a new ServiceRack element
     381    # Kathy thinks it's better to create a buildConfig.xml than put it in collectionConfig.xml
     382   
     383    my $indexdir = &util::filename_cat ($collectdir, $gs_col, "index");
     384    &util::mk_dir($indexdir) unless &util::dir_exists($indexdir);
     385   
     386    my $buildcfg = &util::filename_cat ($indexdir, "buildConfig.xml");
     387    if(-e $buildcfg) {
     388    print STDERR "***** $buildcfg already exists for this fedora collection.\n";
     389    print STDERR "***** Not modifying it to insert a FedoraServiceProxy ServiceRack.\n";
     390    }
     391    else { # or do I just have a template buildConfig.xml that I copy over?
     392   
     393    my $contents = "<buildConfig>\n";
     394    $contents .= "  <metadataList/>\n";
     395    $contents .= "  <serviceRackList>\n";                                                           
     396    $contents .= "    <serviceRack name=\"FedoraServiceProxy\" />\n";
     397    $contents .= "  </serviceRackList>\n";
     398    $contents .= "</buildConfig>\n";
     399   
     400    #print STDERR "**** collectcfg file: $collectcfg\n";
     401    unless(open(FOUT, ">$buildcfg")) {
     402        print STDERR "g2f-buildcol.pl: Unable to open $collectcfg...ERROR: $!\n";
     403        exit 1;
     404    }
     405    print FOUT $contents;
     406    close(FIN);
     407    }
    379408}
    380409
Note: See TracChangeset for help on using the changeset viewer.