Index: gsdl/trunk/bin/script/import.pl
===================================================================
--- gsdl/trunk/bin/script/import.pl	(revision 17038)
+++ gsdl/trunk/bin/script/import.pl	(revision 17142)
@@ -253,5 +253,5 @@
 	'modegli' => "4" },
       { 'name' => "gli",
-	'desc' => "",
+	'desc' => "{scripts.gli}",
 	'type' => "flag",
 	'reqd' => "no",
@@ -273,13 +273,12 @@
     # params
     my ($language, $verbosity, $debug,
-	$importdir, $site, $manifest, $incremental, $keepold, 
-	$removeold, $saveas,
+	$collectdir, $importdir, $archivedir, $site, $manifest, 
+	$incremental, $keepold, $removeold, 
+	$saveas,
 	$OIDtype, $OIDmetadata, 
 	$maxdocs, $statsfile,
-	$out, $faillog, $collectdir, $gli,
-
-	$archivedir, 
+	$out, $faillog, $gli,
 	$gzip, $groupsize, 
-	$sortmeta, $reversesort, $removeprefix, $removesuffix, 
+	$sortmeta, $reversesort, $removeprefix, $removesuffix 
 	);
 
@@ -287,5 +286,5 @@
 
     # other vars
-    my ($configfilename, $collectcfg, $collection, 
+    my ($configfilename, $collection, $collectcfg, 
 	$archive_info_filename, $archive_info, 
 	$gs_mode,
@@ -331,5 +330,5 @@
     if ($intArgLeftinAfterParsing != 1 || (@ARGV && $ARGV[0] =~ /^\-+h/))
     {
-	&PrintUsage::print_txt_usage($options, "{buildcol.params}");
+	&PrintUsage::print_txt_usage($options, "{import.params}");
 	die "\n";
     }
@@ -432,22 +431,9 @@
     }
 
-    if ($OIDtype !~ /^(hash|incremental|assigned|dirname)$/) {
+    if (!defined $OIDtype || ($OIDtype !~ /^(hash|incremental|assigned|dirname)$/ )) {
 	if (defined $collectcfg->{'OIDtype'} && $collectcfg->{'OIDtype'} =~ /^(hash|incremental|assigned|dirname)$/) {
 	    $OIDtype = $collectcfg->{'OIDtype'};
 	} else {
 	    $OIDtype = "hash"; # the default
-	}
-    }
-
-    my ($plugout); 
-    if (defined $collectcfg->{'plugout'}) {
-	$plugout = $collectcfg->{'plugout'};
-    }
-    else{
-	if ($saveas !~ /^(GA|.*METS|DSpace|MARCXML)$/) {
-	    push @$plugout,"GAPlugout";
-	}
-	else{
-	    push @$plugout,$saveas."Plugout";
 	}
     }
@@ -484,15 +470,9 @@
 	$gli = 1;
     }
-    
-    
-    # global plugin stuff
-    if (defined $collectcfg->{'separate_cjk'} && $collectcfg->{'separate_cjk'} =~ /^true$/i) {
-	push @global_opts, "-separate_cjk";
-    }
-    
+    $gli = 0 unless defined $gli;
+       
     # check keepold and removeold
     ($removeold, $keepold, $incremental) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, $incremental, "archives", $collectcfg);
  
-    $gli = 0 unless defined $gli;
 
     print STDERR "<Import>\n" if $gli;
@@ -538,14 +518,6 @@
 
     # read the archive information file
-
-    # If saveas=DSpace, a "contents" file will be created, otherwise "archives.inf"
-    
-    # the plugouts should be doing this!!
-    if ($saveas eq "DSpace"){
-	$archive_info_filename = &util::filename_cat ($archivedir, "contents");
-    } elsif ($saveas =~ m/^.*METS$/ || $saveas eq "GA" || $saveas eq "MARC" ) {
-	$archive_info_filename = &util::filename_cat ($archivedir, "archives.inf");
-    }
-
+    $archive_info_filename = &util::filename_cat ($archivedir, "archives.inf");
+    
     $archive_info = new arcinfo ();
     $archive_info->load_info ($archive_info_filename);
@@ -555,4 +527,17 @@
 
     ####Use Plugout####
+    my ($plugout); 
+    if (defined $collectcfg->{'plugout'} && $collectcfg->{'plugout'} =~ /^(GA|GreenstoneMETS)Plugout/) {
+	$plugout = $collectcfg->{'plugout'};
+    }
+    else{
+	if ($saveas !~ /^(GA|GreenstoneMETS)$/) {
+	    push @$plugout,"GAPlugout";
+	}
+	else{
+	    push @$plugout,$saveas."Plugout";
+	}
+    }
+
     push @$plugout,("-output_info",$archive_info) if (defined $archive_info); 
     push @$plugout,("-verbosity",$verbosity) if (defined $verbosity);
@@ -590,27 +575,4 @@
 	}
     }
-
-    if ($saveas eq "FedoraMETS")
-    {
-	# This would be better (should?!) be done in Plugout!!
-
-	# create collection "doc obj" for Fedora that contains
-	# collection-level metadata
-	
-	my $doc_obj = new doc($configfilename,"nonindexed_doc");
-	$doc_obj->set_OID("collection");
-	
-	my $col_name = undef;
-	my $col_meta = $collectcfg->{'collectionmeta'};
-	if (defined $col_meta)
-	{
-	    store_collectionmeta($col_meta,"collectionname",$doc_obj);
-	    store_collectionmeta($col_meta,"collectioextra",$doc_obj);
-	    
-	}
-	
-	$processor->process($doc_obj);
-    }
-
 
     &plugin::end($pluginfo, $processor);
