Index: /trunk/for-distributions/bin/script/create_distributions.pl
===================================================================
--- /trunk/for-distributions/bin/script/create_distributions.pl	(revision 9491)
+++ /trunk/for-distributions/bin/script/create_distributions.pl	(revision 9492)
@@ -157,14 +157,13 @@
 	`makegli.sh`;
 
-	# JAR up the gli, then clean up the class files
+	# JAR up the gli, then delete the class files
 	print STDERR "jarring gli...\n";
 	`makejar.sh`;
 	&util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "jar"));
 	&util::rm(&util::filename_cat($tmpdir, "gsdl", "gli", "metadata.zip"));
-	`clean.sh`;
+	&util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "classes", "org"));
 
 	# Remove bits used by none of the distributions
 	&util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "cpan", "XML-Parser-2.27.tar.gz"));
-	&util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "kea", "kea-3.0", "CSTR"));
 
 	# copy ChangeLog into $tmpdir/gsdl
@@ -181,40 +180,40 @@
     }
 
-    &create_collection_distributions() unless $no_cols;
-}
-
-
-sub create_windows_distribution {
-    print STDERR "Creating Windows distribution...\n";
-
-    my $windows_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-win32");
-    mkdir ($windows_dist_dir, 0777);
-
-    # empty "collect" directory (just because all the other distributions have one)
-    mkdir (&util::filename_cat($windows_dist_dir, "collect"), 0777);
-
-    # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
-    &install_docs ($windows_dist_dir, 1);
-
-    # gsdl directory
-    &install_gsdl ($windows_dist_dir);
-
-    # gli directory (in gsdl)
-    &install_gli($windows_dist_dir, "windows");
-
-    # src directory
-    &install_src ($windows_dist_dir, "windows");
-
-    # Windows directory
-    &install_windows_specific ($windows_dist_dir, 0);
-
-    # we want to include the unbuilt bits of the demo collection too
-    my $demodir = &util::filename_cat($windows_dist_dir, "gsdl", "collect", "demo");
-    my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
-    die "oops, no demo dir\n" unless -d $demodir;
-    &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
-    &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
-    &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
-}
+    # &create_collection_distributions() unless $no_cols;
+}
+
+
+# sub create_windows_distribution {
+#     print STDERR "Creating Windows distribution...\n";
+
+#     my $windows_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-win32");
+#     mkdir ($windows_dist_dir, 0777);
+
+#     # empty "collect" directory (just because all the other distributions have one)
+#     mkdir (&util::filename_cat($windows_dist_dir, "collect"), 0777);
+
+#     # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
+#     &install_docs ($windows_dist_dir, 1);
+
+#     # gsdl directory
+#     &install_gsdl ($windows_dist_dir);
+
+#     # gli directory (in gsdl)
+#     &install_gli($windows_dist_dir, "windows");
+
+#     # src directory
+#     &install_src ($windows_dist_dir, "windows");
+
+#     # Windows directory
+#     &install_windows_specific ($windows_dist_dir, 0);
+
+#     # we want to include the unbuilt bits of the demo collection too
+#     my $demodir = &util::filename_cat($windows_dist_dir, "gsdl", "collect", "demo");
+#     my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
+#     die "oops, no demo dir\n" unless -d $demodir;
+#     &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
+#     &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
+#     &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
+# }
 
 
@@ -250,47 +249,47 @@
 
 
-sub create_unix_distribution_old {
-    print STDERR "Creating Unix distribution...\n";
-
-    my $unix_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-unix");
-    mkdir ($unix_dist_dir, 0777);
-
-    # empty "collect" directory
-    mkdir (&util::filename_cat($unix_dist_dir, "collect"), 0777);
-
-    # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
-    &install_docs ($unix_dist_dir, 1);
-
-    # Don't need Windows README file
-    &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-cp1251"));
-
-    # Rename Unix README file
-    &util::cp(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"),
-	      &util::filename_cat($unix_dist_dir, "READMEru.txt"));
-    &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"));
-
-    # gsdl directory
-    &install_gsdl ($unix_dist_dir);
-
-    # gli directory (in gsdl)
-    &install_gli($unix_dist_dir, "unix");
-
-    # src directory
-    &install_src ($unix_dist_dir, "unix");
-
-    # Unix directory
-    &install_unix_specific ($unix_dist_dir);
-
-    # Make sure all configure scripts are executable
-    `cd $unix_dist_dir; pwd; find -name "configure" -exec chmod a+x {} \\;`;
-
-    # we want to include the unbuilt bits of the demo collection too
-    my $demodir = &util::filename_cat($unix_dist_dir, "gsdl", "collect", "demo");
-    my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
-    die "oops, no demo dir\n" unless -d $demodir;
-    &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
-    &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
-    &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
-}
+# sub create_unix_distribution_old {
+#     print STDERR "Creating Unix distribution...\n";
+
+#     my $unix_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-unix");
+#     mkdir ($unix_dist_dir, 0777);
+
+#     # empty "collect" directory
+#     mkdir (&util::filename_cat($unix_dist_dir, "collect"), 0777);
+
+#     # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
+#     &install_docs ($unix_dist_dir, 1);
+
+#     # Don't need Windows README file
+#     &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-cp1251"));
+
+#     # Rename Unix README file
+#     &util::cp(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"),
+# 	      &util::filename_cat($unix_dist_dir, "READMEru.txt"));
+#     &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"));
+
+#     # gsdl directory
+#     &install_gsdl ($unix_dist_dir);
+
+#     # gli directory (in gsdl)
+#     &install_gli($unix_dist_dir, "unix");
+
+#     # src directory
+#     &install_src ($unix_dist_dir, "unix");
+
+#     # Unix directory
+#     &install_unix_specific ($unix_dist_dir);
+
+#     # Make sure all configure scripts are executable
+#     `cd $unix_dist_dir; pwd; find -name "configure" -exec chmod a+x {} \\;`;
+
+#     # we want to include the unbuilt bits of the demo collection too
+#     my $demodir = &util::filename_cat($unix_dist_dir, "gsdl", "collect", "demo");
+#     my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
+#     die "oops, no demo dir\n" unless -d $demodir;
+#     &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
+#     &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
+#     &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
+# }
 
 
@@ -333,6 +332,6 @@
 
     # Make sure there is a dictionary_en.properties to prevent GLI problems
-    &util::cp(&util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary.properties"),
-	      &util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary_en.properties"));
+    # &util::cp(&util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary.properties"),
+	#       &util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary_en.properties"));
 
     # (We don't include the built demo collection in the source distribution)
@@ -376,4 +375,20 @@
     &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
     &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
+
+    # Include the documented example collections
+    my $source_collect_dir = &util::filename_cat($for_distributions_dir, "collect");
+    my $target_collect_dir = &util::filename_cat($cdrom_dist_dir, "collect");
+
+    &util::cp_r(&util::filename_cat($source_collect_dir, "MARC-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "authen-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "cltbib-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "cltext-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "dls-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "garish"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "gsarch-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "image-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "isis-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "oai-e"), $target_collect_dir);
+    &util::cp_r(&util::filename_cat($source_collect_dir, "wrdpdf-e"), $target_collect_dir);
 
     # Make sure the whole thing is user-writeable
@@ -596,6 +611,6 @@
 
     # Make sure there is a dictionary_en.properties to prevent GLI problems
-    &util::cp(&util::filename_cat($gli_dir, "classes", "dictionary.properties"),
-	      &util::filename_cat($gli_dir, "classes", "dictionary_en.properties"));
+    # &util::cp(&util::filename_cat($gli_dir, "classes", "dictionary.properties"),
+# 	      &util::filename_cat($gli_dir, "classes", "dictionary_en.properties"));
 
     # Remove unwanted stuff - all distributions
@@ -913,7 +928,7 @@
     my ($tag, $date, $file);
 
-    my $datefile = &util::filename_cat ($ENV{'GSDLHOME'}, "DistDates");
+    my $datefile = &util::filename_cat ($for_distributions_dir, "DistDates");
     if ($changelogdate !~ /\w/) {
-	# get date from $GSDLHOME/DistDates (and update DistDates)
+	# get date from for-distributions/DistDates (and update DistDates)
 	open (DATES, $datefile) || die "can't open $datefile\n";
 	my $line = "";
@@ -938,5 +953,5 @@
 
     chdir($ENV{'GSDLHOME'});
-    my $cmd = "cvs2cl.pl -P -F trunk -r -S -l \"-d'$changelogdate<tomorrow'\"";
+    my $cmd = "$for_distributions_dir/bin/script/cvs2cl.pl -P -F trunk -r -S -l \"-d'$changelogdate<tomorrow'\"";
     system ($cmd);
 }
@@ -945,34 +960,34 @@
 # makes a copy of the initial version of gsdlsite.cfg in
 # /tmp (if it doesn't exist already).
-sub edit_gsdlsite {
-    my ($gsdlhome) = @_;
-
-    my $gsdlsite_file = &util::filename_cat ($tmpdir, "gsdl", "cgi-bin", "gsdlsite.cfg");
-    my $tmp_gsdlsite_file = &util::filename_cat ($tmpdir, "gsdlsite.cfg");
-
-    if (-e $tmp_gsdlsite_file) {
-	&util::cp ($tmp_gsdlsite_file, $gsdlsite_file);
-    } else {
-	&util::cp ($gsdlsite_file, $tmp_gsdlsite_file);
-    }
-
-    open (GSDLSITE, $gsdlsite_file) || die;
-    my $line = ""; my $file = ""; my $found = 0;
-    while (defined ($line = <GSDLSITE>)) {
-	if ($line =~ s/\*\*GSDLHOME\*\*/$gsdlhome/g) {
-	    $found = 1;
-	}
-	$file .= $line;
-    }
-    close GSDLSITE;
-
-    if (!$found) {
-	die "ERROR: $gsdlsite_file contains no **GSDLHOME** string\n";
-    }
-
-    open (GSDLSITE, ">$gsdlsite_file") || die;
-    print GSDLSITE $file;
-    close GSDLSITE;
-}
+# sub edit_gsdlsite {
+#     my ($gsdlhome) = @_;
+
+#     my $gsdlsite_file = &util::filename_cat ($tmpdir, "gsdl", "cgi-bin", "gsdlsite.cfg");
+#     my $tmp_gsdlsite_file = &util::filename_cat ($tmpdir, "gsdlsite.cfg");
+
+#     if (-e $tmp_gsdlsite_file) {
+# 	&util::cp ($tmp_gsdlsite_file, $gsdlsite_file);
+#     } else {
+# 	&util::cp ($gsdlsite_file, $tmp_gsdlsite_file);
+#     }
+
+#     open (GSDLSITE, $gsdlsite_file) || die;
+#     my $line = ""; my $file = ""; my $found = 0;
+#     while (defined ($line = <GSDLSITE>)) {
+# 	if ($line =~ s/\*\*GSDLHOME\*\*/$gsdlhome/g) {
+# 	    $found = 1;
+# 	}
+# 	$file .= $line;
+#     }
+#     close GSDLSITE;
+
+#     if (!$found) {
+# 	die "ERROR: $gsdlsite_file contains no **GSDLHOME** string\n";
+#     }
+
+#     open (GSDLSITE, ">$gsdlsite_file") || die;
+#     print GSDLSITE $file;
+#     close GSDLSITE;
+# }
 
 # currently just checks that iconcollection fields are correct and that
