Ignore:
Timestamp:
2007-05-30T17:55:36+12:00 (17 years ago)
Author:
sjboddie
Message:

More modifications to support additional collection-level customisations
to be put in gsdl/collect/COLLECTION/custom/COLLECTION. basebuilder.pm,
classify.pm, colcfg.pm, and plugin.pm were modified to allow
collection-specific plugins, classifiers, builders, and buildprocs to
be located in the new locations. These changes should not have any effect
on existing collections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/colcfg.pm

    r14023 r14112  
    3030use cfgread;
    3131use cfgread4gs3;
     32use gsprintf 'gsprintf';
    3233use strict;
    3334
     
    160161}
    161162
     163sub get_collect_cfg_name {
     164    my ($out) = @_;
     165
     166    # First check if there's a
     167    # gsdl/collect/COLLECTION/custom/COLLECTION/etc/collect.cfg file. This
     168    # customization was added for DLC by Stefan, 30/6/2007.
     169    my $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "custom", $ENV{'GSDLCOLLECTION'}, "etc", "collect.cfg");
     170
     171    if (-e $configfilename) {
     172        return ($configfilename, "gs2");
     173    }
     174
     175    # Now check if there is a collect.cfg file in the usual place, i.e. it is gs2.
     176    $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg");
     177    if (-e $configfilename) {
     178        return ($configfilename, "gs2");
     179    }
     180
     181    # If we get to here we check if there is a collectionConfig.xml file,
     182    # i.e. it is gs3.
     183    $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collectionConfig.xml");   
     184    if (-e $configfilename) {
     185        return ($configfilename, "gs3");
     186    }
     187
     188    # Error. No collection configuration file.
     189    (&gsprintf($out, "{common.cannot_find_cfg_file}\n", $configfilename) && die);
     190}
     191
    1621921;
    163193
Note: See TracChangeset for help on using the changeset viewer.