Index: /for-distributions/trunk/bin/script/create_distributions.pl
===================================================================
--- /for-distributions/trunk/bin/script/create_distributions.pl	(revision 14298)
+++ /for-distributions/trunk/bin/script/create_distributions.pl	(revision 14299)
@@ -10,5 +10,5 @@
 # create_distributions.pl creates the following distribution source directories
 # from the gsdl directory pointed to by $GSDLHOME (although it uses the 
-# main CVS repository to get the latest source code distribution).
+# main SVN repository to get the latest source code distribution).
 
 # CDROM - main distribution source: gsdl-x.xx-cdrom
@@ -24,5 +24,5 @@
 #    so ChangeLog contains lots of ancient stuff 
 
-#    creates a copy of everything in cvs repository in $tmpdir
+#    creates a copy of everything in svn repository in $tmpdir
 
 #    edits /tmp/gsdl/etc/VERSION, /tmp/gsdl/src/w32server/fnord.cpp
@@ -31,5 +31,7 @@
 
 # temporary working directory
-my $tmpdir = '/tmp/';
+
+my $tmpdir = '/tmp/tmp';
+#my $tmpdir = '/research/oranfry/greenstone2-releases/2.74/dist/tmp/';
 
 # docs directory - up-to-date copy of everything to go in the docs directory 
@@ -49,6 +51,6 @@
 my $macosxbin = "$ENV{'GSDLHOME'}/bin/darwin";
 
-my $cvsanon = ':pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src';
-
+#my $cvsanon = ':pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src';
+my $svnroot = "http://svn.greenstone.org";
 
 use strict;
@@ -67,5 +69,5 @@
     print STDERR "   -output_dir            directory to output distributions to\n";
     print STDERR "   -version_num           version number of distribution (x.xx)\n";
-    print STDERR "   -cvs_tag               cvs tag from which to create distributions\n";
+    print STDERR "   -svn_tag               svn tag from which to create distributions\n";
     print STDERR "                          - if not set latest versions will be used.\n";
     print STDERR "   -unesco                create unesco style release, i.e. only 4 languages enabled\n";
@@ -74,5 +76,5 @@
     print STDERR "   -ChangeLogDate         date from which to begin ChangeLog - note that ChangeLog\n";
     print STDERR "                          will always run from date to most recent commits, even if\n";
-    print STDERR "                          cvs_tag is for a previous revision\n\n";
+    print STDERR "                          svn_tag is for a previous revision\n\n";
 }
 
@@ -81,5 +83,5 @@
 my $newtmpdir;
 my $version_num;
-my $cvs_tag;
+my $svn_tag;
 my $unesco;
 my $nochangelog;
@@ -93,5 +95,5 @@
 			 'tmpdir/.*/', \$newtmpdir,
 			 'version_num/\d\.\d\d[a-z]?', \$version_num,
-			 'cvs_tag/.*/', \$cvs_tag,
+			 'svn_tag/.*/', \$svn_tag,
 			 'unesco', \$unesco,
 			 'NoChangeLog', \$nochangelog,
@@ -107,8 +109,8 @@
     mkdir ($output_dir, 0777) unless -d $output_dir;
 
-    if ($cvs_tag !~ /\w/) {
-	$cvs_tag = $version_num;
-	$cvs_tag =~ s/\./\_/g;
-	$cvs_tag = "gsdl-" . $cvs_tag . "-distribution";
+    if ($svn_tag !~ /\w/) {
+	$svn_tag = $version_num;
+	$svn_tag =~ s/\./\_/g;
+	$svn_tag = "gsdl-" . $svn_tag . "-distribution";
     }
 
@@ -118,14 +120,27 @@
     print STDERR "\nexporting gsdl to $tmpdir\n\n";
     chdir($tmpdir);
-    `cvs -d $cvsanon export -D "1 second ago" gsdl`;
+	#`svn export $svnroot/gsdl/trunk gsdl`
+
+    #`cvs -d $cvsanon export -D "1 second ago" gsdl`;
     # use something like the following if you want a previous version
+	my $output;
+	$output=`svn export $svnroot/gsdl/branches/gsdl-2.74 gsdl`;
+	print STDERR $output;
     #`cvs -d $cvsanon export -r gsdl-2_70-distribution-branch gsdl`; 
     
     # Export gli to $tmpdir/gli
-    print STDERR "\nexporting gli to " . &util::filename_cat($tmpdir, "gsdl") . "\n\n";
-    chdir(&util::filename_cat($tmpdir, "gsdl"));
-    `cvs -d $cvsanon export -D "1 second ago" gli`;
+   chdir(&util::filename_cat($tmpdir, "gsdl"));
+	
+	print STDERR "\nexporting indexers to " . &util::filename_cat($tmpdir, "gsdl") . "\n\n";
+	$output=`svn export $svnroot/indexers/trunk indexers`;	
+	print STDERR $output;	
+
+	print STDERR "\nexporting gli to " . &util::filename_cat($tmpdir, "gsdl") . "\n\n";
+	$output=`svn export $svnroot/gli/trunk gli`;
+	print STDERR $output;
+    #`cvs -d $cvsanon export -D "1 second ago" gli`;
+
     # use something like the following if you want a previous version
-    #`cvs -d $cvsanon export -r gsdl-2_70-distribution-branch gli`;
+    #`svn export $svnroot/gli/branches/2.74 gli`;
     
     # Compile gli
@@ -152,5 +167,7 @@
     print STDERR "\ncompiling gli...\n";
     chdir(&util::filename_cat($tmpdir, "gsdl", "gli"));
-    `./makegli.sh`;
+	my $output;
+    $output=`./makegli.sh`;
+	print STDERR $output;
     
     # JAR up the gli, then delete the class files
@@ -158,5 +175,7 @@
     `./makejar.sh`;
     &util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "jar"));
-    &util::rm(&util::filename_cat($tmpdir, "gsdl", "gli", "metadata.zip"));
+	#metadata.zip is deleted by makegli.sh
+    #&util::rm(&util::filename_cat($tmpdir, "gsdl", "gli", "metadata.zip"));
+	
     &util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "classes", "org"));
     
@@ -581,6 +600,6 @@
     &util::cp_r ($winbin, $winbindir);
 
-    # make sure there aren't any CVS directories laying around
-    &remove_cvs_dirs ($windir);
+    # make sure there aren't any .svn directories laying around
+    &remove_svn_dirs ($windir);
 }
 
@@ -611,6 +630,6 @@
     `chmod -R a+x $macosxbindir`;
 
-    # make sure there aren't any CVS directories laying around
-    &remove_cvs_dirs ($unixdir);
+    # make sure there aren't any .svn directories laying around
+    &remove_svn_dirs ($unixdir);
 }
 
@@ -668,6 +687,6 @@
     &util::cp_r ($from_perllib, $to_dir) if -d $from_perllib;
 
-    # make sure there aren't any CVS directories laying around
-    &remove_cvs_dirs ($to_dir);
+    # make sure there aren't any .svn directories laying around
+    &remove_svn_dirs ($to_dir);
 
     return 1;
@@ -703,5 +722,5 @@
 	    if ($line =~ /\w/) {
 		($tag, $date) = $line =~ /^(\S+)\t(.*)$/;
-		$changelogdate = $date unless ($tag eq $cvs_tag);
+		$changelogdate = $date unless ($tag eq $svn_tag);
 	    }
 	    $file .= $line;
@@ -710,8 +729,8 @@
     }
 
-    if ((!defined $tag) || ($tag ne $cvs_tag)) {
+    if ((!defined $tag) || ($tag ne $svn_tag)) {
 	open (DATES, ">$datefile") || die;
 	print DATES $file if defined $file;
-	print DATES "$cvs_tag\t" . `date`;
+	print DATES "$svn_tag\t" . `date`;
 	close DATES;
     }
@@ -725,7 +744,7 @@
 
 # simply recurses directory structure beginning at $dir
-# and deletes any CVS administrative directories it comes 
+# and deletes any .svn administrative directories it comes 
 # across
-sub remove_cvs_dirs {
+sub remove_svn_dirs {
     my ($dir) = @_;
 
@@ -740,8 +759,8 @@
 	my $fullpath = &util::filename_cat ($dir, $file);
 	if (-d $fullpath) {
-	    if ($file eq "CVS") {
+	    if ($file eq ".svn") {
 		&util::rm_r ($fullpath);
 	    } else {
-		&remove_cvs_dirs ($fullpath);
+		&remove_svn_dirs ($fullpath);
 	    }
 	}
@@ -763,9 +782,9 @@
     }
     if ($mode != 1) {
-	my $to = $zip_to . ".tgz";
-	unlink ($to) if -e $to;
-	print STDERR "tarring and gzipping $to\n";
-	print STDERR "tar cvzf $to $zip_from\n";
-	system ("tar cvzf $to $zip_from");
+	my $to2 = $zip_to . ".tgz";
+	unlink ($to2) if -e $to2;
+	print STDERR "tarring and gzipping $to2\n";
+	print STDERR "tar cvzf $to2 $zip_from\n";
+	system ("tar cvzf $to2 $zip_from");
     }
 }
@@ -779,5 +798,5 @@
 	if ($line =~ s/(gsdl version: )x\.xx/$1$version_num/) {
 	    $found ++;
-	} elsif ($line =~ s/(cvs tag: )gsdl-x_xx-distribution/$1$cvs_tag/) {
+	} elsif ($line =~ s/(svn tag: )gsdl-x_xx-distribution/$1$svn_tag/) {
 	    $found ++;
 	}
@@ -798,4 +817,5 @@
     $found = 0; $line = ""; $file = "";
     while (defined ($line = <GSDLCONF>)) {
+
 	if ($line =~ s/(\#define GSDL_VERSION \")x\.xx(\")/$1$version_num$2/) {
 	    $found ++;
@@ -804,6 +824,7 @@
     }
     close GSDLCONF;
-    if (!$found) {
-	die "error while editing $gsdlconf_file\n";
+
+    if ( !$found ) {
+		die "error while editing $gsdlconf_file\n";
     } 
     
