Ignore:
Timestamp:
2001-04-05T22:30:39+12:00 (23 years ago)
Author:
sjboddie
Message:

Reverted import.pl to version 1.25 as the last commit wiped out some of
the more recent changes. There didn't appear to be any new changes in the
now defunct version 1.26 so I'm guessing it was just a mistake. My sincere
apologies to David if I've screwed something up (but he started it ;-)

File:
1 edited

Legend:

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

    r2268 r2287  
    4848
    4949sub print_usage {
    50     print STDERR "\n  usage: $0 [options] collection-name\n\n";
     50    print STDERR "\n";
     51    print STDERR "import.pl: Converts documents in collections -importdir directory into\n";
     52    print STDERR "           gml documents which are written to the -archivedir directory.\n\n";
     53    print STDERR "  usage: $0 [options] collection-name\n\n";
    5154    print STDERR "  options:\n";
    5255    print STDERR "   -verbosity number      0=none, 3=lots\n";
     
    6568    print STDERR "                          building. This will be disabled if groupsize > 1\n";
    6669    print STDERR "   -debug                 Print imported text to STDOUT\n";
     70    print STDERR "   -collectdir directory  Collection directory (defaults to " .
     71    &util::filename_cat ($ENV{'GSDLHOME'}, "collect") . ")\n";
    6772    print STDERR "   -out                   Filename or handle to print output status to.\n";
    6873    print STDERR "                          The default is STDERR\n\n";
     
    7580    $removeold, $gzip, $groupsize, $debug, $maxdocs, $collection,
    7681    $configfilename, $collectcfg, $pluginfo, $sortmeta,
    77     $archive_info_filename, $archive_info, $processor, $out);
     82    $archive_info_filename, $archive_info, $processor,
     83    $out, $collectdir);
    7884    if (!parsargv::parse(\@ARGV,
    7985             'verbosity/\d+/2', \$verbosity,
     
    8793             'debug', \$debug,
    8894             'maxdocs/^\-?\d+/-1', \$maxdocs,
     95             'collectdir/.*/', \$collectdir,
    8996             'out/.*/STDERR', \$out)) {
    9097    &print_usage();
     
    104111
    105112    # get and check the collection name
    106     if (($collection = &util::use_collection(@ARGV)) eq "") {
     113    if (($collection = &util::use_collection(@ARGV, $collectdir)) eq "") {
    107114    &print_usage();
    108115    die "\n";
     
    126133    # get the list of plugins for this collection
    127134    my $plugins = [];
    128     $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc/collect.cfg");
     135    $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg");
    129136    if (-e $configfilename) {
    130137    $collectcfg = &colcfg::read_collect_cfg ($configfilename);
     
    152159    # fill in the default import and archives directories if none
    153160    # were supplied, turn all \ into / and remove trailing /
    154     $importdir = "$ENV{'GSDLCOLLECTDIR'}/import" if $importdir eq "";
     161    $importdir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "import") if $importdir eq "";
    155162    $importdir =~ s/[\\\/]+/\//g;
    156163    $importdir =~ s/\/$//;
    157     $archivedir = "$ENV{'GSDLCOLLECTDIR'}/archives" if $archivedir eq "";
     164    $archivedir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "archives") if $archivedir eq "";
    158165    $archivedir =~ s/[\\\/]+/\//g;
    159166    $archivedir =~ s/\/$//;
     
    193200    &plugin::read ($pluginfo, $importdir, "", {}, $processor, $maxdocs);
    194201   
    195     &plugin::end($pluginfo,$processor);
     202    &plugin::end($pluginfo, $processor);
    196203   
    197204    # write out the archive information file
Note: See TracChangeset for help on using the changeset viewer.