Index: gsdl/trunk/bin/script/full-rebuild.pl
===================================================================
--- gsdl/trunk/bin/script/full-rebuild.pl	(revision 18509)
+++ gsdl/trunk/bin/script/full-rebuild.pl	(revision 18510)
@@ -61,10 +61,40 @@
     my $collect = pop @argv;
 
-    my $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect);
-    if (!-d $collect_dir) {
+
+    my @filtered_argv = ();
+
+    my $collect_dir = undef;
+    my $build_dir  = undef;
+
+    while (my $arg = shift @argv) {
+	if ($arg eq "-collectdir") {
+	    $collect_dir = shift @argv;
+	    push(@filtered_argv,$arg,$collect_dir);
+	}
+	elsif ($arg eq "-builddir") {
+	    $build_dir = shift @argv;
+	    push(@filtered_argv,$arg,$build_dir);
+	}
+	else {
+	    push(@filtered_argv,$arg);
+	}
+    }
+
+
+    if (!defined $collect_dir) {
+	$collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect");
+    }
+    my $this_collect_dir = &util::filename_cat($collect_dir,$collect);
+
+    if (!-d $this_collect_dir) {
 	print STDERR "Error: $collect_dir does not exist\n";
 	exit(-1);
     }
 
+
+    if (!defined $build_dir) {
+	$build_dir = &util::filename_cat($this_collect_dir,"building");
+	push(@filtered_argv,"-builddir",$build_dir);
+    }
 
     
@@ -91,5 +121,4 @@
 	my $buildcol_status = system($buildcol_cmd)/256;
 	if ($buildcol_status == 0) {
-	    my $building_dir = &util::filename_cat($collect_dir,"building");
 	    my $index_dir = &util::filename_cat($collect_dir,"index");
 
@@ -106,5 +135,5 @@
 	    print "************************\n";
 
-	    &util::mv($building_dir,$index_dir);
+	    &util::mv($build_dir,$index_dir);
 
 	}
Index: gsdl/trunk/bin/script/incremental-buildcol.pl
===================================================================
--- gsdl/trunk/bin/script/incremental-buildcol.pl	(revision 18509)
+++ gsdl/trunk/bin/script/incremental-buildcol.pl	(revision 18510)
@@ -83,7 +83,9 @@
 
     if (!defined $collect_dir) {
-	$collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect);
+	$collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect");
     }
-    if (!-d $collect_dir) {
+    my $this_collect_dir = &util::filename_cat($collect_dir,$collect);
+
+    if (!-d $this_collect_dir) {
 	print STDERR "Error: $collect_dir does not exist\n";
 	exit(-1);
@@ -92,5 +94,5 @@
 
     if (!defined $build_dir) {
-	$build_dir = &util::filename_cat($collect_dir,"index");
+	$build_dir = &util::filename_cat($this_collect_dir,"index");
 	push(@filtered_argv,"-builddir",$build_dir);
     }
Index: gsdl/trunk/bin/script/incremental-import.pl
===================================================================
--- gsdl/trunk/bin/script/incremental-import.pl	(revision 18509)
+++ gsdl/trunk/bin/script/incremental-import.pl	(revision 18510)
@@ -85,10 +85,11 @@
     }
 
+    if (!defined $collect_dir) {
+	$collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect");
+    }
+    my $this_collect_dir = &util::filename_cat($collect_dir,$collect);
 
-    if (!defined $collect_dir) {
-	$collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect);
-    }
-    if (!-d $collect_dir) {
-	print STDERR "Error: $collect_dir does not exist\n";
+    if (!-d $this_collect_dir) {
+	print STDERR "Error: $this_collect_dir does not exist\n";
 	exit(-1);
     }
@@ -96,5 +97,5 @@
 
     if (!defined $archive_dir) {
-	$archive_dir = &util::filename_cat($collect_dir,"archives");
+	$archive_dir = &util::filename_cat($this_collect_dir,"archives");
     }
     
Index: gsdl/trunk/bin/script/incremental-rebuild.pl
===================================================================
--- gsdl/trunk/bin/script/incremental-rebuild.pl	(revision 18509)
+++ gsdl/trunk/bin/script/incremental-rebuild.pl	(revision 18510)
@@ -61,12 +61,4 @@
     my $collect = pop @argv;
 
-    my $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect);
-    if (!-d $collect_dir) {
-	print STDERR "Error: $collect_dir does not exist\n";
-	exit(-1);
-    }
-
-
-    
     my $quoted_argv = join(" ", map { "\"$_\"" } @argv);
     
