Changeset 20571
- Timestamp:
- 2009-09-10T10:33:00+12:00 (15 years ago)
- Location:
- gsdl/trunk/bin/script
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/buildcol.pl
r20098 r20571 31 31 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 32 32 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan"); 33 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/perl-5.8"); 33 34 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/XML/XPath"); 34 35 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugins"); … … 274 275 # command line args 275 276 my ($verbosity, $archivedir, $cachedir, $builddir, $site, $maxdocs, 276 $debug, $mode, $indexname, $removeold, $keepold, $incremental, 277 $debug, $mode, $indexname, $removeold, $keepold, 278 $incremental, $incremental_mode, 277 279 $remove_empty_classifications, 278 280 $collectdir, $build, $type, $textindex, … … 445 447 } 446 448 447 ($removeold, $keepold, $incremental) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, $incremental, "building", $collectcfg); 449 ($removeold, $keepold, $incremental, $incremental_mode) 450 = &scriptutil::check_removeold_and_keepold($removeold, $keepold, 451 $incremental, "building", 452 $collectcfg); 448 453 449 454 $gli = 0 unless defined $gli; -
gsdl/trunk/bin/script/export.pl
r20415 r20571 276 276 my ($language, $verbosity, $debug, 277 277 $collectdir, $importdir, $exportdir, $site, $manifest, 278 $incremental, $ keepold, $removeold,278 $incremental, $incremental_mode, $keepold, $removeold, 279 279 $saveas, 280 280 $OIDtype, $OIDmetadata, … … 450 450 451 451 # 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); 453 456 454 457 print STDERR "<export>\n" if $gli; … … 469 472 470 473 # 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); 472 475 473 476 if (scalar(@$pluginfo) == 0) { … … 579 582 $processor->close_group_output() if $processor->is_group(); 580 583 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)$/) { 583 597 $export_info->save_info($expinfo_doc_filename); 584 598 } 599 else { 600 $export_info->save_revinfo_gdbm($expinfo_src_filename); 601 } 602 585 603 586 604 # write out export stats -
gsdl/trunk/bin/script/import.pl
r20098 r20571 36 36 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 37 37 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan"); 38 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/perl-5.8"); 38 39 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugins"); 39 40 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugouts"); … … 278 279 my ($language, $verbosity, $debug, 279 280 $collectdir, $importdir, $archivedir, $site, $manifest, 280 $incremental, $ keepold, $removeold,281 $incremental, $incremental_mode, $keepold, $removeold, 281 282 $saveas, 282 283 $OIDtype, $OIDmetadata, … … 480 481 481 482 # check keepold and removeold 482 ($removeold, $keepold, $incremental) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, $incremental, "archives", $collectcfg); 483 ($removeold, $keepold, $incremental, $incremental_mode) 484 = &scriptutil::check_removeold_and_keepold($removeold, $keepold, 485 $incremental, "archives", 486 $collectcfg); 483 487 484 488 … … 501 505 502 506 # load all the plugins 503 $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog, \@global_opts, $incremental );507 $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog, \@global_opts, $incremental_mode); 504 508 if (scalar(@$pluginfo) == 0) { 505 509 &gsprintf($out, "{import.no_plugins_loaded}\n"); … … 585 589 586 590 587 if (!$removeold) { 591 if ($incremental) { 592 # equivalent to saying ($keepold && ($incremental_mode eq "all")) 588 593 589 594 &inexport::prime_doc_oid_count($archivedir); … … 593 598 # been deleted 594 599 595 &inexport::new_vs_old_import_diff($archive_info,$block_hash,$importdir); 600 &inexport::new_vs_old_import_diff($archive_info,$block_hash,$importdir, 601 $archivedir,$verbosity,$incremental_mode); 596 602 597 603 my @deleted_files = sort keys %{$block_hash->{'deleted_files'}}; … … 639 645 640 646 641 # not sure if the following will work -- wil the metadata datastructure be correctly initialized647 # not sure if the following will work -- will the metadata data-structure be correctly initialized 642 648 # in the right order? 643 649 # foreach my $file (@new_files, @reindex_files) { … … 688 694 689 695 # for backwards compatability with archvies.inf file 690 if ($arcinfo_doc_filename =~ m/ \.inf$/) {696 if ($arcinfo_doc_filename =~ m/(contents)|(\.inf)$/) { 691 697 $archive_info->save_info($arcinfo_doc_filename); 692 698 } -
gsdl/trunk/bin/script/incremental-import.pl
r19744 r20571 120 120 } 121 121 else { 122 ### print STDERR "$archiveinf_doc does not exist.\n";123 122 print STDERR "*****\n"; 124 123 print STDERR "First time import. Switching to full import.pl.\n"; -
gsdl/trunk/bin/script/pluginfo.pl
r16787 r20571 36 36 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 37 37 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan"); 38 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/perl-5.8"); 38 39 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugins"); 39 40
Note:
See TracChangeset
for help on using the changeset viewer.