Changeset 14031


Ignore:
Timestamp:
2007-04-30T16:40:58+12:00 (17 years ago)
Author:
xiao
Message:

Changes made to look for collectionConfig.xml in gs3 mode and collect.cfg in gs2 mode, rather than presumably only for the file collect.cfg.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/import.pl

    r13169 r14031  
    323323    $faillog->autoflush(1);
    324324   
    325     # check that there is a collect.cfg file
     325    # check that there is a collect.cfg file, i.e. it is gs2.
    326326    $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg");
    327     if (!-e $configfilename) {
     327    if (-e $configfilename) {
     328      $collectcfg = &colcfg::read_collect_cfg ($configfilename);
     329
     330    } else {
     331      # check that there is a collectionConfig.xml file, i.e. it is gs3.
     332      $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collectionConfig.xml");
     333      if (!-e $configfilename) {
    328334    (&gsprintf($out, "{common.cannot_find_cfg_file}\n", $configfilename) && die);
    329     }
    330     $collectcfg = &colcfg::read_collect_cfg ($configfilename);
    331 
    332    
     335      } else {
     336    $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename);
     337      }
     338    }
     339
    333340    if (defined $collectcfg->{'importdir'} && $importdir eq "") {
    334341    $importdir = $collectcfg->{'importdir'};
Note: See TracChangeset for help on using the changeset viewer.