Ignore:
Timestamp:
2009-12-07T14:41:20+13:00 (14 years ago)
Author:
kjdon
Message:

extended extensions mechanism to include gs3 extensions. added code to call plugin::removeold

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/import.pl

    r20807 r21291  
    5151    }
    5252    }
     53    if (defined $ENV{'GSDL3EXTS'}) {
     54    my @extensions = split(/:/,$ENV{'GSDL3EXTS'});
     55    foreach my $e (@extensions) {
     56        my $ext_prefix = "$ENV{'GSDL3SRCHOME'}/ext/$e";
     57
     58        unshift (@INC, "$ext_prefix/perllib");
     59        unshift (@INC, "$ext_prefix/perllib/cpan");
     60        unshift (@INC, "$ext_prefix/perllib/plugins");
     61        unshift (@INC, "$ext_prefix/perllib/plugouts");
     62    }
     63    }
    5364}
    5465
     
    510521    }
    511522    }
     523
    512524    # create the archives dir if needed
    513525    &util::mk_all_dir($archivedir);
     
    562574   
    563575    &plugin::begin($pluginfo, $importdir, $processor, $maxdocs, $gli);
    564 
     576   
     577    if ($removeold) {
     578    print STDERR "calling plugin::removeold\n";
     579        # occasionally, plugins may want to do something on remove old, eg pharos image indexing
     580    &plugin::removeold($pluginfo, $importdir, $processor, $maxdocs, $gli);
     581    }
    565582    if ($manifest eq "") {
    566583    # process the import directory
Note: See TracChangeset for help on using the changeset viewer.