Ignore:
Timestamp:
2009-09-10T10:33:00+12:00 (15 years ago)
Author:
davidb
Message:

Introduction of variable 'incremental_mode' that is set to 'none', 'onlyadd', or 'all' depending on settings of -removeold -keepold and -incremental. Some minor edits to tidy up the code have also been made in this commit

File:
1 edited

Legend:

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

    r20415 r20571  
    276276    my ($language, $verbosity, $debug,
    277277    $collectdir, $importdir, $exportdir, $site, $manifest,
    278     $incremental, $keepold, $removeold,
     278    $incremental, $incremental_mode, $keepold, $removeold,
    279279    $saveas,
    280280    $OIDtype, $OIDmetadata,
     
    450450
    451451    # check keepold and removeold
    452     ($removeold, $keepold, $incremental) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, $incremental, "export", $collectcfg);
     452    ($removeold, $keepold, $incremental, $incremental_mode)
     453    = &scriptutil::check_removeold_and_keepold($removeold, $keepold,
     454                           $incremental, "export",
     455                           $collectcfg);
    453456
    454457    print STDERR "<export>\n" if $gli;
     
    469472   
    470473    # load all the plugins
    471     $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog, \@global_opts);
     474    $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog, \@global_opts, $incremental_mode);
    472475       
    473476    if (scalar(@$pluginfo) == 0) {
     
    579582    $processor->close_group_output() if $processor->is_group();
    580583
    581     if (($saveas =~ m/^.*METS$/) || ($saveas eq "MARCXML")) {
    582     # Not all export types need this (e.g. DSpace)
     584#    if (($saveas =~ m/^.*METS$/) || ($saveas eq "MARCXML")) {
     585#   # Not all export types need this,
     586
     587##  $export_info->save_info($expinfo_doc_filename);
     588#    }
     589
     590    my $expinfo_src_filename = &util::filename_cat ($exportdir, "archiveinf-src");   
     591    &util::rename_gdbm_file($expinfo_src_filename); # ensures gdb
     592    $expinfo_src_filename .= ".gdb";
     593
     594
     595    # for backwards compatability with archvies.inf file
     596    if ($expinfo_doc_filename =~ m/(contents)|(\.inf)$/) {
    583597    $export_info->save_info($expinfo_doc_filename);
    584598    }
     599    else {
     600    $export_info->save_revinfo_gdbm($expinfo_src_filename);
     601    }
     602
    585603       
    586604    # write out export stats
Note: See TracChangeset for help on using the changeset viewer.