Changeset 14925 for gsdl/trunk/bin/script/export.pl
- Timestamp:
- 2007-12-19T15:03:24+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/export.pl
r14733 r14925 117 117 'reqd' => "no", 118 118 'hiddengli' => "yes" }, 119 { 'name' => "site", 120 'desc' => "{import.site}", 121 'type' => "string", 122 'deft' => "", 123 'reqd' => "no", 124 'hiddengli' => "yes" }, 119 125 { 'name' => "collectdir", 120 126 'desc' => "{export.collectdir}", 121 127 'type' => "string", 122 'deft' => &util::filename_cat ($ENV{'GSDLHOME'}, "collect"), 123 'reqd' => "no", 128 # parsearg left "" as default 129 #'deft' => &util::filename_cat ($ENV{'GSDLHOME'}, "collect"), 130 'reqd' => "no", 124 131 'hiddengli' => "yes" }, 125 132 { 'name' => "listall", … … 247 254 sub main { 248 255 # params 249 my ($language, $verbosity, $importdir, $exportdir, $ keepold, $listall,256 my ($language, $verbosity, $importdir, $exportdir, $site, $keepold, $listall, 250 257 $removeold, $saveas, $saveas_version, $debug, $OIDtype, $OIDmetadata, 251 $maxdocs, $statsfile, $xsltfile, $mapping_file, $out, $faillog, 258 $maxdocs, $statsfile, $xsltfile, $mapping_file, $out, $faillog, $gs_mode, $collectcfg, 252 259 $collectdir, $gli,$xslt_mets,$xslt_txt,$group_marc); 253 260 my $xml = 0; … … 334 341 eval { 335 342 # get and check the collection name 336 if (($collection = &util::use_collection($collect_name, $collectdir)) eq "") { 343 print STDERR "**** site = $site\n"; 344 if (($collection = &colcfg::use_collection($site, $collect_name, $collectdir)) eq "") { 337 345 &PrintUsage::print_txt_usage($options, "{export.params}"); 338 346 die "\n"; … … 365 373 my @global_opts = (); 366 374 367 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc", "collect.cfg"); 368 if (!-e $configfilename) { 369 (&gsprintf($out, "{common.cannot_find_cfg_file}\n", $configfilename) && die); 370 } 371 372 my $collectcfg = &colcfg::read_collect_cfg ($configfilename); 375 # Read in the collection configuration file. 376 ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 377 378 if ($gs_mode eq "gs2") { 379 $collectcfg = &colcfg::read_collect_cfg ($configfilename); 380 } elsif ($gs_mode eq "gs3") { 381 $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename); 382 } 383 373 384 if (defined $collectcfg->{'plugin'}) { 374 385 $plugins = $collectcfg->{'plugin'};
Note:
See TracChangeset
for help on using the changeset viewer.