Index: /other-projects/trunk/gs2-release-maker/bin/build-demo-collection.sh
===================================================================
--- /other-projects/trunk/gs2-release-maker/bin/build-demo-collection.sh	(revision 14771)
+++ /other-projects/trunk/gs2-release-maker/bin/build-demo-collection.sh	(revision 14771)
@@ -0,0 +1,5 @@
+. setup.bash
+import.pl --removeold demo
+buildcol.pl --removeold demo 
+
+
Index: /other-projects/trunk/gs2-release-maker/bin/create-distribution-wrapper.sh.backup
===================================================================
--- /other-projects/trunk/gs2-release-maker/bin/create-distribution-wrapper.sh.backup	(revision 14771)
+++ /other-projects/trunk/gs2-release-maker/bin/create-distribution-wrapper.sh.backup	(revision 14771)
@@ -0,0 +1,8 @@
+#!/bin/sh
+# $1 - version (e.g., 2.75)
+# $2 - branch path (e.g., branches/2.75)
+
+cd gsdl
+source setup.bash
+cd ../dist
+/home/nzdl/for-distributions/bin/script/create_distributions.pl -version_num $1 -branch_path $2 -output_dir `pwd` -NoChangeLog
Index: /other-projects/trunk/gs2-release-maker/bin/gsp.sh
===================================================================
--- /other-projects/trunk/gs2-release-maker/bin/gsp.sh	(revision 14771)
+++ /other-projects/trunk/gs2-release-maker/bin/gsp.sh	(revision 14771)
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# gets a value from a properties file given a name
+
+property=$1
+file=$2
+
+if [ "$property" == "" ] || [ "$file" == "" ]; then
+	exit -1
+fi
+
+#echo find line, strip property, honour comments
+rval=`egrep ^$property[:=] $file | sed s/$property[:=]// | sed s/\#.*//g`
+
+#echo strip trailing whitespace
+echo $rval | sed 's/ *$//'
Index: /other-projects/trunk/gs2-release-maker/build.properties.example
===================================================================
--- /other-projects/trunk/gs2-release-maker/build.properties.example	(revision 14771)
+++ /other-projects/trunk/gs2-release-maker/build.properties.example	(revision 14771)
@@ -0,0 +1,16 @@
+#version stuff
+version:2.75
+#implied: version.major=2
+version.minor=75
+
+
+#where to store data
+release.dir:/research/oranfry/releases/2.75
+mac.release.dir:/Users/oranfry/releases/2.75
+windows.release.dir:c:\\research\\oranfry\\releases\\2.75
+
+
+#ssh
+username:oranfry
+
+
Index: /other-projects/trunk/gs2-release-maker/build.xml
===================================================================
--- /other-projects/trunk/gs2-release-maker/build.xml	(revision 14771)
+++ /other-projects/trunk/gs2-release-maker/build.xml	(revision 14771)
@@ -0,0 +1,1323 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<!--
+		.......................................................... 
+		September 2007
+		Greenstone2 'release maker' script
+		Oran Fry
+		..........................................................
+-->
+
+<project name="gs2-release-maker" default="help">
+
+	<!-- classpath -->
+	<path id="project.classpath">
+		<fileset dir="tasks">
+			<include name="**/*.jar"/>
+		</fileset>
+		<fileset dir="lib">
+			<include name="*.jar"/>
+		</fileset>
+		<pathelement path="tasks/orans"/>
+	</path>
+
+	<!-- svn root -->
+	<property name="svn.root" value="http://svn.greenstone.org"/>
+
+	<!-- self defined tasks -->
+	<taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
+	<taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
+	<taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
+	<taskdef name="setloglevel" classname="SetLogLevel" classpathref="project.classpath"/>
+	<typedef name="addressedcall" classname="TreeCallTarget" classpathref="project.classpath"/>
+	<typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
+	<taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.SCP" classpathref="project.classpath"/>
+	<taskdef name="sshexec" classname="org.apache.tools.ant.taskdefs.optional.SSHExec" classpathref="project.classpath"/>
+
+
+	<!-- load in static properties from build.properties -->
+	<property file="build.properties" />
+
+	<!-- stuff to do before all tasks -->
+	<target name="init">
+
+		<echo level="info">CHECKING PRE-CONDITIONS</echo>
+		<echo level="info"/>
+
+		<!-- version number -->
+		<echo level="info">Checking if version number is set...</echo>
+		<if>
+			<bool>
+				<or>
+					<not><isset property="version"/></not>
+					<not><isset property="version.minor"/></not>
+				</or>
+			</bool>
+			<echo level="error">No, not set</echo>
+			<echo level="error">Please specify a version number</echo>
+			<echo level="error">E.g., ant -Dversion=3.03 -Dversion.minor=03 create-release</echo>
+			<echo level="error">or,   ant -Dversion=trunk -Dversion.minor=03 create-release</echo>
+			<fail>Version number not set</fail>
+		</if>
+		<echo level="info">Version number: ${version}</echo>
+		<property name="app.version" value="${version}"/>
+		<echo level="info"/>
+
+		<!-- where to put the release -->
+		<echo level="info">Determining where to put the release...</echo>
+		<if>
+			<bool>
+				<or>
+					<not><isset property="release.dir"/></not>
+					<not><isset property="mac.release.dir"/></not>
+					<not><isset property="windows.release.dir"/></not>
+				</or>
+				
+			</bool>
+			<echo level="error">No release directory specified.</echo>
+			<echo level="error">Please specify release directory on the command line.</echo>
+			<echo level="error">E.g., ant -Drelease.dir=/research/me/releases/3.03 -Dmac.release.dir=/Users/me/releases/3.03 -Dwindows.release.dir=c:\research\me\releases\3.03 create-release</echo>
+			<fail>Release directorys not set</fail>
+		</if>
+		<echo level="info">Release directory: ${release.dir}</echo>
+		<echo level="info">Mac release directory: ${mac.release.dir}</echo>
+		<echo level="info">Windows release directory: ${windows.release.dir}</echo>
+		<echo level="info"/>
+
+		<!-- check start from -->
+		<echo level="info">Checking if we are resuming from a given target...</echo>
+		<if>
+			<bool>
+				<not><isset property="resume.from"/></not>
+			</bool>
+			<echo level="info">No, start from the beginning</echo>
+			<property name="resume.from" value="1"/>
+			<else>
+				<echo level="info">Yes, resuming from ${resume.from}</echo>
+			</else>
+		</if>
+		<echo level="info"/>
+
+		<!-- check resume mode-->
+		<echo level="info">Determining resume mode...</echo>
+		<if>
+			<bool>
+				<not><isset property="resume.mode"/></not>
+			</bool>
+			<echo level="info">Mode not set, defaulting to 'fallthrough'</echo>
+			<property name="resume.mode" value="fallthrough"/>
+			<else>
+				<echo level="info">Mode set to ${resume.mode}</echo>
+				<if>
+					<bool>
+						<and>
+							<not><equals arg1="${resume.mode}" arg2="descend"/></not>
+							<not><equals arg1="${resume.mode}" arg2="fallthrough"/></not>
+						</and>
+					</bool>
+					<echo level="error">You have not specified a valid resume mode.</echo>
+					<echo level="error">Valid modes are 'fallthrough' and 'descend'.</echo>
+					<fail>You have not specified a valid resume mode.</fail>
+				</if>
+			</else>
+		</if>
+		<echo level="info"/>
+
+		<!-- check username and password -->
+		<echo level="info">Checking if username and password set...</echo>
+		<if>
+			<bool>
+				<not><isset property="username"/></not>
+			</bool>
+			<echo level="info">Not set</echo>
+			<fail>You have not specified a username for ssh</fail>
+		</if>
+		<echo level="info"/>
+
+		<!-- execute target code or just traverse tree -->
+		<echo level="info">Determining execute mode...</echo>
+		<if>
+			<bool>
+				<not><isset property="execute"/></not>
+			</bool>
+			<echo level="info">Execute not set, defaulting to 'true'</echo>
+			<property name="execute" value="true"/>
+			<else>
+				<echo level="info">Execute set to ${execute}</echo>
+				<if>
+					<bool>
+						<and>
+							<not><equals arg1="${execute}" arg2="true"/></not>
+							<not><equals arg1="${execute}" arg2="false"/></not>
+						</and>
+					</bool>
+					<echo level="error">You have not specified a valid value for execute.</echo>
+					<echo level="error">Valid values are 'true' and 'false'.</echo>
+					<fail>You have not specified a valid value for execute.</fail>
+				</if>
+			</else>
+		</if>
+
+		<echo level="info"/>
+
+
+		<!-- the trunk or a branch -->
+		<echo level="info">Determining the branch path...</echo>
+		<if>
+			<bool>
+				<equals arg1="trunk" arg2="${version}"/>
+			</bool>
+			<property name="branch.path" value="trunk"/>
+
+			<else>
+				<property name="branch.path" value="branches/${version}"/>
+			</else>
+		</if>
+		<echo level="info">Branch Path: ${branch.path}</echo>
+		<echo level="info"/>
+
+		<!-- check branches exist -->
+		<property name="svn.gsdl" value="${svn.root}/gsdl/${branch.path}"/>
+		<property name="svn.gli" value="${svn.root}/gli/${branch.path}"/>
+		<property name="svn.indexers" value="${svn.root}/indexers/${branch.path}"/>
+		<property name="svn.documentation" value="${svn.root}/documentation/${branch.path}"/>
+
+ 		<tempfile property="temp.file" destdir="${java.io.tmpdir}" prefix="delete" suffix=".tmp"/>
+
+		<!-- gsdl branch -->
+		<echo level="info">Checking that ${svn.gsdl} exists...</echo>
+		<!-- try to put the  html index of the location into the temp file -->
+		<setloglevel level="error"/>
+		<try>
+			<get src="${svn.gsdl}" dest="${temp.file}"/>
+			<catch>
+				<echo level="error">No, does not exist</echo>
+				<property name="svn.gsdl.unavailable" value="true"/>
+			</catch>
+		</try>
+		<setloglevel level="info"/>
+		<if>
+			<bool><not><istrue value="${svn.gsdl.unavailable}"/></not></bool>
+			<echo level="info">Yes, it exists</echo>
+		</if>
+
+		<!-- gli branch -->
+		<echo level="info">Checking that ${svn.gli} exists...</echo>
+		<setloglevel level="error"/>
+		<try>
+			<get src="${svn.gli}" dest="${temp.file}"/>
+			<catch>
+				<echo level="error">No, does not exist</echo>
+				<property name="svn.gli.unavailable" value="true"/>
+			</catch>
+		</try>
+		<setloglevel level="info"/>
+		<if>
+			<bool><not><istrue value="${svn.gli.unavailable}"/></not></bool>
+			<echo level="info">Yes, it exists</echo>
+		</if>
+
+
+		<!-- indexers branch -->
+		<echo level="info">Checking that ${svn.indexers} exists...</echo>
+		<setloglevel level="error"/>
+		<try>
+			<get src="${svn.indexers}" dest="${temp.file}"/>
+			<catch>
+				<echo level="error">No, it does not exist</echo>
+				<property name="svn.indexers.unavailable" value="true"/>
+			</catch>
+		</try>
+		<setloglevel level="info"/>
+		<if>
+			<bool><not><istrue value="${svn.indexers.unavailable}"/></not></bool>
+			<echo level="info">Yes, it exists</echo>
+		</if>
+
+		<!-- documentation branch -->
+		<echo level="info">Checking that ${svn.documentation} exists...</echo>
+		<setloglevel level="error"/>
+		<try>
+			<get src="${svn.documentation}" dest="${temp.file}"/>
+			<catch>
+				<echo level="error">No, it does not exist</echo>
+				<property name="svn.documentation.unavailable" value="true"/>
+			</catch>
+		</try>
+		<setloglevel level="info"/>
+		<if>
+			<bool><not><istrue value="${svn.documentation.unavailable}"/></not></bool>
+			<echo level="info">Yes, it exists</echo>
+		</if>
+
+		<!-- clean up the temp file -->
+		<setloglevel level="error"/>
+		<delete file="${temp.file}"/>
+		<setloglevel level="info"/>
+
+
+		<!-- fail if some branches were missing -->
+		<if>
+			<bool>
+				<or>
+					<istrue value="${svn.gsdl.unavailable}"/>
+					<istrue value="${svn.gli.unavailable}"/>
+					<istrue value="${svn.indexers.unavailable}"/>
+					<istrue value="${svn.documentation.unavailable}"/>
+				</or>
+			</bool>
+			<fail>Some branches do not exist, or you are unable to access them from where you are. Please review the list above and create any branches that are missing, or run this script from somewhere with access to the repository.</fail>
+			<else>
+				<echo level="info">All exist</echo>
+			</else>
+		</if>
+		<echo level="info"/>
+
+		<!-- get current month and year-->
+		<exec executable="date" outputproperty="current.month">
+			<arg value="+%b"/>
+		</exec>
+		<exec executable="date" outputproperty="current.year">
+			<arg value="+%Y"/>
+		</exec>
+		<echo level="info">Current Month: ${current.month}</echo>
+		<echo level="info">Current Year: ${current.year}</echo>
+
+	</target>
+
+	<target name="help">
+
+		<echo level="info">Usage: ant -Dversion=VERSION_NUMBER -Drelease.dir=RELEASEïŒ¿DIR -Dusername=USERNAME -Dpassword=PASSWORD -Dmac.release.dir=OUTPUT_DIRECTORY [-Dresume.from=TARGET_ADDRESS] [-Dresume.mode=MODE] create-release</echo>
+		<echo level="info"/>
+
+		<echo level="info">This project creates releases of Greenstone2 from the subversion repository given a version number.</echo>
+		<echo level="info"/>
+
+		<echo level="info">Each target in this project's target tree has been given an address, like so:</echo>
+		<echo level="info"/>
+		<echo level="info">root</echo>
+		<echo level="info">  |-1</echo>
+		<echo level="info">  | |-1.1</echo>
+		<echo level="info">  | |-1.2</echo>
+		<echo level="info">  |</echo>
+		<echo level="info">  |-2</echo>
+		<echo level="info">  | |-2.1</echo>
+		<echo level="info">  | |-2.2</echo>
+		<echo level="info">  etc.</echo>
+
+		<echo level="info"/>
+
+
+		<echo level="info">PARAMETERS</echo>
+		<echo level="info">Parameters are specifiable on the command line or in build.properties</echo>
+		<echo level="info">Parameters which remain static throughout the release process should be stores in build.properties:</echo>
+		<echo level="info">version, version.minor, release.dir, mac.release.dir, windows.release.dir, username</echo>
+		<echo level="info">Other parameters will change each time you invoke the script, specify them on the command line:</echo>
+		<echo level="info">resume.from, resume.mode</echo>
+
+
+
+		<echo level="info"/>
+
+		<echo level="info">version=VERSION_NUMBER, where VERSION_NUMBER={x.xx|trunk}</echo>
+		<echo level="info"/>
+		<echo level="info">This project can either create a release from a greenstone3 branch, or from the development trunk.</echo>
+		<echo level="info">To create a branch release, specify the VERSION_NUMBER (e.g., 3.03), and ensure that the following</echo>
+		<echo level="info">branches exist in the repository:</echo>
+		<echo level="info">    greenstone3/branches/VERSION_NUMBER</echo>
+		<echo level="info">    gli/branches/VERSION_NUMBER</echo>
+		<echo level="info">    indexers/branches/VERSION_NUMBER</echo>
+		<echo level="info">    documentation/branches/VERSION_NUMBER</echo>
+		<echo level="info">To create a trunk release, specify 'trunk' as the version number.</echo>
+		<echo level="info">The project will use the trunk of greenstone3, gli, indexers and documentation for the release.</echo>
+		<echo level="info"/>
+		<echo level="info"/>
+
+		<echo level="info">release.dir=RELEASE_DIRECTORY</echo>
+		<echo level="info"/>
+		<echo level="info">Specifies the directory in the filesystem where the release files will be kept.</echo>
+		<echo level="info"/>
+		<echo level="info"/>
+
+		<echo level="info">resume.from=TARGET_ADDRESS, where TARGET_ADDRESS=x.y.z (e.g., 2.1.3)</echo>
+		<echo level="info"/>
+		<echo level="info">Allows you to specify a target address from which execution will resume.</echo>
+		<echo level="info">This is helpful for restarting the script after it has failed part-way through.</echo>
+		<echo level="info">By default, execution starts from the root target (create-release) and proceeds downwards.</echo>
+		<echo level="info">You can specify a different target to start from by setting the resume.from parameter.</echo>
+		<echo level="info"/>
+		<echo level="info"/>
+
+		<echo level="info">resume.mode=RESUME_MODE, where RESUME_MODE={fallthrough|descend}</echo>
+		<echo level="info"/>
+		<echo level="info">fallthrough (default): In fallthrough mode, execution proceeds downwards through the target tree</echo>
+		<echo level="info">1 -> 1.1 -> 1.2 -> 2 -> 2.1 -> 2.2 -> 3 -> 3.1 and so on.</echo>
+		<echo level="info">descend: In descend mode, execution descends a single branch of the target tree.</echo>
+		<echo level="info">For example, if resume.from was set to '2', execution would proceed thus:</echo>
+		<echo level="info">2 -> 2.1 -> 2.2 (exit)</echo>
+		<echo level="info">This is helpful when you want to debug a particular target, or fix some conditions to allow it to finish</echo>
+		<echo level="info">properly, and don't want to run the whole script from the start.</echo>
+		<echo level="info"/>
+		<echo level="info"/>
+
+		<echo level="info">release.dir, mac.release.dir, windows.release.dir</echo>
+		<echo level="info"/>
+		<echo level="info">The full path to the directories where release files will be stored on</echo>
+		<echo level="info">linux(your machine), mac(shuttle) and windows(kohekohe).</echo>
+		<echo level="info">E.g., -Drelease.dir=/research/oranfry/releases/3.03</echo>
+		<echo level="info">E.g., -Dmac.release.dir=/Users/oranfry/releases/3.03</echo>
+		<echo level="info">E.g., -Dwindows.release.dir=c:\\research\\oranfry\\releases\\3.03</echo>
+		<echo level="info"/>
+		<echo level="info"/>
+
+		<echo level="info">username</echo>
+		<echo level="info"/>
+		<echo level="info">Your username for ssh from your machine to shuttle and kohekohe.</echo>
+		<echo level="info">You will be prompted for your password a number of times while the script executes.</echo>
+		<echo level="info"/>
+		<echo level="info"/>
+
+
+	</target>
+
+
+
+
+	<!-- ADDRESSED TARGETS -->
+
+	<!-- ROOT TARGET -->
+	<target name="create-release" depends="init">
+		<echo>Creating Release '${version}'</echo>
+		<addressedcall target="prep"/>
+		<addressedcall target="compile-binaries"/>
+		<addressedcall target="create-distribution"/>
+		<addressedcall target="create-installer-project"/>
+		<addressedcall target="build-installers"/>
+	</target>
+
+
+
+
+
+	<!-- FIRST LEVEL TARGETS -->
+	<target name="prep">
+		<addressedcall target="create-dir-structure" />
+	</target>
+
+	<target name="compile-binaries">
+		<addressedcall target="linux" />
+		<addressedcall target="windows" />
+		<addressedcall target="mac" />
+		<addressedcall target="merge-all" />
+	</target>
+
+	<target name="create-distribution">
+		<if><bool><istrue value="${execute}" /></bool>
+
+			<!-- clean up -->
+			<delete dir="${release.dir}/dist" />
+			<mkdir dir="${release.dir}/dist" />
+
+			<!-- recreate -->
+			<exec dir="${release.dir}/dist" executable="/home/nzdl/for-distributions/bin/script/create_distributions.pl">
+				<env key="GSDLHOME" value="${release.dir}/gsdl"/>
+				<env key="GSDLCOLLECTDIR" value="${release.dir}/gsdl/collect"/>
+				<env key="GSDLOS" value="linux"/>
+
+				<arg value="-version_num"/>
+				<arg value="${version}"/>
+				<arg value="-branch_path"/>
+				<arg value="${branch.path}"/>
+				<arg value="-output_dir"/>
+				<arg value="${release.dir}/dist"/>
+				<arg value="-NoChangeLog"/>
+
+			</exec>
+		</if>
+	</target>
+
+	<target name="create-installer-project">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<!-- use OS's copy so that permissions are preserved -->
+			<delete dir="${release.dir}/installer/gsdl"/>
+			<exec executable="cp"><arg line="-r /home/nzdl/for-distributions/installers/gsdl ${release.dir}/installer"/></exec>
+
+			<!-- Edit the <installer-dir>/gsdl/Greenstone Digital Library Software.uip file and change any absolute paths as needed. Make sure you change all paths. -->
+			<copy overwrite="true" file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.template" tofile="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix" />
+			<rsr file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix" pattern="@release\.dir@" replacement="${release.dir}" />
+			<rsr file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix" pattern="@version\.minor@" replacement="${version.minor}" />
+			<if>
+				<bool><equals arg1="${version}" arg2="trunk"/></bool>
+				<rsr file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix" pattern="@version@" replacement="trunk" />
+				<else>
+					<rsr file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix" pattern="@version@" replacement="v${version}" />
+				</else>
+			</if>
+
+
+			<!--
+			*  Set GSDL_DISTRIBUTION_SOURCE to .../dist/gsdl-x.xx-cdrom (dist is the directory you created earlier)
+			* Set GSDL_WEB_DISTRIBUTION_EXTRAS to .../dist/gsdl-x.xx-unix
+			* Set INSTALLERS_DIR to the installer directory from above
+			-->
+
+			<rsr file="/home/nzdl/installshieldX/alias.properties" pattern="(GSDL_DISTRIBUTION_SOURCE)=.*" replacement="$1=${release.dir}/dist/gsdl-2.${version.minor}-cdrom" />
+			<rsr file="/home/nzdl/installshieldX/alias.properties" pattern="(GSDL_WEB_DISTRIBUTION_EXTRAS)=.*" replacement="$1=${release.dir}/dist/gsdl-2.${version.minor}-unix" />
+			<rsr file="/home/nzdl/installshieldX/alias.properties" pattern="(INSTALLERS_DIR)=.*" replacement="$1=${release.dir}/installer" />
+
+			<!-- create the windows version -->
+			<copy overwrite="true" file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix" tofile="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.windows" />
+			<rsr file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.windows" pattern="&quot;storedAs&quot;&gt;1&lt;" replacement="&quot;storedAs&quot;&gt;0&lt;" />
+
+		</if>
+	</target>
+
+	<target name="build-installers">
+		<addressedcall target="build-installer-linux" />
+		<addressedcall target="build-installer-mac" />
+		<addressedcall target="build-installer-windows" />
+		<addressedcall target="build-installer-source" />
+		<addressedcall target="get-gli-client" />
+
+	</target>
+
+
+
+
+
+
+
+	<!-- SECOND LEVEL TARGETS -->
+	<target name="create-dir-structure">
+		<if><bool><istrue value="${execute}"/></bool>
+			<mkdir dir="${release.dir}" />
+			<mkdir dir="${release.dir}/other-platforms" />
+			<mkdir dir="${release.dir}/installer" />
+			<mkdir dir="${release.dir}/release-${version}" />
+		</if>
+	</target>
+	
+	<target name="linux">
+		<addressedcall target="linux-preparation"/>
+		<addressedcall target="linux-configuration"/>
+		<addressedcall target="linux-building"/>
+	</target>
+
+	<target name="mac">
+		<addressedcall target="mac-preparation"/>
+		<addressedcall target="mac-configuration"/>
+		<addressedcall target="mac-building"/>
+		<addressedcall target="mac-demo-collection"/>
+	</target>
+
+
+	<target name="windows">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<mkdir dir="${release.dir}/other-platforms/win-bin-windows"/>
+
+			<echo level="info">The windows compilation stage still has to be done manually.</echo>
+			<echo level="info">Please go to the kohekohe machine and follow the instructions found at:</echo>
+			<echo level="info">http://wesson.cs.waikato.ac.nz:7070/wiki/index.php/Creating_A_Release</echo>
+			<echo level="info">Do  the 'Preparation' and 'Building' sections.</echo>
+			<echo level="info">(Ignore the last step, which tells you where to copy the resulting files.)</echo>
+			<echo level="info"/>
+
+			<echo level="info">Then copy (scp):</echo>
+			<echo level="info">Windows:gsdl/bin/windows/* to Linux:${release.dir}/other-platforms/win-bin-windows</echo>
+			<echo level="info"/>
+			<input addproperty="windows.compilation.done" validargs="done">Type 'done' when you have finished.</input>
+		</if>
+	</target>
+
+	<target name="merge-all">
+		<if><bool><istrue value="${execute}" /></bool>
+			<!-- mac -->
+			<delete dir="${release.dir}/gsdl/bin/darwin"/>
+			<exec executable="cp"><arg line="-r ${release.dir}/other-platforms/mac-bin-darwin ${release.dir}/gsdl/bin/darwin"/></exec>
+
+			<!-- windows -->
+			<delete dir="${release.dir}/gsdl/bin/windows"/>
+			<exec executable="cp"><arg line="-r ${release.dir}/other-platforms/win-bin-windows ${release.dir}/gsdl/bin/windows"/></exec>
+		</if>
+	</target>
+
+	<target name="build-installer-linux">
+		<if><bool><istrue value="${execute}" /></bool>
+
+			<echo level="info">use the unix installer</echo>
+			<copy overwrite="true" file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix"
+				tofile="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip" />
+
+
+			<echo level="info">do a commandline build</echo>
+			<exec dir="${release.dir}/installer/gsdl" executable="/home/nzdl/installshieldX/InstallShieldUniversalCommandLineBuild">
+				<arg value="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip" />
+				<arg value="-build" />
+				<arg value="Linux Web Distribution" />
+			</exec>
+		
+			<echo level="info">finish off</echo>
+			<exec dir="${release.dir}/installer/gsdl" executable="${release.dir}/installer/gsdl/finish-linux.sh">
+				<arg value="linux-web"/>
+			</exec>
+
+			<delete dir="${release.dir}/installer/gsdl/linux-web/gsdl-${version}-unix"/>
+			<move file="${release.dir}/installer/gsdl/linux-web/disk1" tofile="${release.dir}/installer/gsdl/linux-web/gsdl-${version}-unix"/>
+
+			<echo level="info">tar to the release-${version} directory</echo>
+			<tar destfile="${release.dir}/release-${version}/gsdl-${version}-unix.tar.gz" basedir="${release.dir}/installer/gsdl/linux-web/gsdl-${version}-unix" compression="gzip" />
+
+		</if>
+	</target>
+
+	<target name="build-installer-mac">
+		<if><bool><istrue value="${execute}" /></bool>
+
+			<echo level="info">use the unix installer</echo>
+			<copy overwrite="true" file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.unix"
+				tofile="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip" />
+
+			<echo level="info">do a commandline build</echo>
+			<exec dir="${release.dir}/installer/gsdl" executable="/home/nzdl/installshieldX/InstallShieldUniversalCommandLineBuild">
+				<arg value="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip" />
+				<arg value="-build" />
+				<arg value="Mac OS X Web Distribution" />
+			</exec>
+
+			<echo level="info">finish off</echo>
+			<exec dir="${release.dir}/installer/gsdl" executable="${release.dir}/installer/gsdl/finish-macOSx.sh">
+				<arg value="macOSx-web"/>
+			</exec>
+
+			<delete dir="${release.dir}/installer/gsdl/macOSx-web/gsdl-${version}-macOSx"/>
+			<move file="${release.dir}/installer/gsdl/macOSx-web/disk1" tofile="${release.dir}/installer/gsdl/macOSx-web/gsdl-${version}-macOSx"/>
+
+			<echo level="info">tar to the release-${version} directory</echo>
+			<tar destfile="${release.dir}/release-${version}/gsdl-${version}-macOSx.tar.gz" basedir="${release.dir}/installer/gsdl/macOSx-web/gsdl-${version}-macOSx" compression="gzip" />
+
+
+		</if>
+	</target>
+
+	<target name="build-installer-windows">
+		<if><bool><istrue value="${execute}" /></bool>
+
+			<echo level="info">use the windows installer</echo>
+			<copy overwrite="true" file="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip.windows"
+				tofile="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip" />
+
+			<echo level="info">do a commandline build</echo>
+			<exec dir="${release.dir}/installer/gsdl" executable="/home/nzdl/installshieldX/InstallShieldUniversalCommandLineBuild">
+				<arg value="${release.dir}/installer/gsdl/Greenstone Digital Library Software.uip" />
+				<arg value="-build" />
+				<arg value="Windows Web Distribution" />
+			</exec>
+
+			<echo level="info">finish off</echo>
+			<move file="${release.dir}/installer/gsdl/windows-web/disk1/setupwin32.exe" tofile="${release.dir}/release-${version}/gsdl-${version}-win32.exe"/>
+
+		</if>
+	</target>
+
+	<target name="build-installer-source">
+		<if><bool><istrue value="${execute}" /></bool>
+
+			<echo level="info">tar to the release-${version} directory</echo>
+			<tar destfile="${release.dir}/release-${version}/gsdl-${version}-src.tar.gz" basedir="${release.dir}/dist/gsdl-${version}-src" compression="gzip" />
+
+		</if>
+	</target>
+
+	<target name="get-gli-client">
+		<if><bool><istrue value="${execute}" /></bool>
+
+			<echo level="info">copy to the release-${version} directory</echo>
+			<copy file="${release.dir}/dist/gli-client-${version}.zip" todir="${release.dir}/release-${version}"/>
+
+		</if>
+	</target>
+
+
+
+
+	<!-- THIRD LEVEL TARGETS -->
+	<target name="linux-preparation">
+		<addressedcall target="checkout-gsdl-indexers-gli" />
+		<!--<addressedcall target="set-version-numbers" />-->
+		<addressedcall target="insert-windows-perl" />
+		<addressedcall target="prepare-to-build-demo-collection" />
+		<addressedcall target="build-demo-collection" />
+		<addressedcall target="insert-demo-collection" />
+	</target>
+
+	<target name="linux-configuration">
+		<addressedcall target="add-static-to-configure-in"/>
+		<addressedcall target="set-environment-in-packages-configure"/>
+		<addressedcall target="run-configure"/>
+		<addressedcall target="makefiles-add-static"/>
+	</target>
+
+	<target name="linux-building">
+		<addressedcall target="run-make"/>
+		<addressedcall target="fix-wget"/>
+		<addressedcall target="run-make-install"/>
+		<addressedcall target="copy-library-oai"/>
+		<addressedcall target="strip-execs"/>
+	</target>
+
+	<target name="mac-preparation">
+		<addressedcall target="mac-checkout-gsdl"/>
+		<!--<addressedcall target="mac-set-version-numbers"/>-->
+	</target>
+
+	<target name="mac-configuration">
+		<addressedcall target="mac-run-configure"/>
+		<addressedcall target="mac-tweak-makefiles"/>
+	</target>
+
+	<target name="mac-building">
+		<addressedcall target="mac-make"/>
+		<addressedcall target="mac-make-install"/>
+		<addressedcall target="mac-copy-library-oai"/>
+		<addressedcall target="mac-strip-execs"/>
+		<addressedcall target="mac-send-files-to-linux-machine"/>
+	</target>
+
+	<target name="mac-demo-collection">
+		<addressedcall target="mac-prepare-to-build-demo-collection"/>
+		<addressedcall target="mac-build-demo-collection"/>
+	</target>
+
+
+	<!-- FOURTH LEVEL TARGETS -->
+	<target name="checkout-gsdl-indexers-gli">
+		<if><bool><istrue value="${execute}"/></bool>
+			<svn>
+				<checkout url="${svn.root}/gsdl/${branch.path}" destPath="${release.dir}/gsdl"/>
+			</svn>
+			<svn>
+				<checkout url="${svn.root}/indexers/${branch.path}" destPath="${release.dir}/gsdl/indexers"/>
+			</svn>
+			<svn>
+				<checkout url="${svn.root}/gli/${branch.path}" destPath="${release.dir}/gsdl/gli"/>
+			</svn>
+		</if>
+	</target>
+
+<!--	<target name="set-version-numbers">
+		<if><bool><istrue value="${execute}"/></bool>
+
+		</if>
+	</target> -->
+
+<!--	<target name="commit-version-numbers">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<if><bool><not><equals arg1="${version}" arg2="trunk"/></not></bool>
+				<svn>
+					<commit file="${release.dir}/gsdl/gli/src/org/greenstone/gatherer/Gatherer.java" message="checking-in version number change"/>
+					<commit file="${release.dir}/gsdl/Install.sh"  message="checking-in version number change"/>
+				</svn>
+			</if>
+
+		</if>
+	</target>-->
+
+	<target name="insert-windows-perl">
+		<if><bool><istrue value="${execute}"/></bool>
+			<mkdir dir="${release.dir}/gsdl/bin/windows"/>
+			<delete dir="${release.dir}/gsdl/bin/windows/perl"/>
+			<exec executable="cp"><arg line="-r /home/nzdl/for-distributions/bin/windows/perl ${release.dir}/gsdl/bin/windows"/></exec>
+		</if>
+	</target>
+
+	<target name="prepare-to-build-demo-collection">
+		<if><bool><istrue value="${execute}"/></bool>	
+			<svn>
+				<checkout url="${svn.root}/gsdl/${branch.path}" destPath="${release.dir}/demo-collection"/>
+			</svn>
+			<svn>
+				<checkout url="${svn.root}/indexers/${branch.path}" destPath="${release.dir}/demo-collection/indexers"/>
+			</svn>
+			<exec dir="${release.dir}/demo-collection" executable="${release.dir}/demo-collection/configure"/>
+			<exec dir="${release.dir}/demo-collection" executable="make"/>
+			<exec dir="${release.dir}/demo-collection" executable="make"><arg value="install"/></exec>
+		</if>
+	</target>
+
+	<target name="build-demo-collection">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec dir="${release.dir}/demo-collection" executable="${basedir}/bin/build-demo-collection.sh"/>
+			<delete dir="${release.dir}/demo-collection/collect/demo/index"/>
+			<move file="${release.dir}/demo-collection/collect/demo/building" tofile="${release.dir}/demo-collection/collect/demo/index"/>
+		</if>
+	</target>
+
+	<target name="insert-demo-collection">
+		<if><bool><istrue value="${execute}"/></bool>
+			<delete dir="${release.dir}/gsdl/collect/demo" />
+			<exec executable="cp"><arg line="-r ${release.dir}/demo-collection/collect/demo ${release.dir}/gsdl/collect"/></exec>
+		</if>
+	</target>
+	
+	<target name="add-static-to-configure-in">
+		<if><bool><istrue value="${execute}"/></bool>
+			<rsr file="${release.dir}/gsdl/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
+			<exec dir="${release.dir}/gsdl" executable="autoconf" output="${release.dir}/gsdl/configure"><arg value="configure.in"/></exec>
+		</if>
+	</target>
+
+	<target name="set-environment-in-packages-configure">
+		<if><bool><istrue value="${execute}"/></bool>
+			<rsr file="${release.dir}/gsdl/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
+		</if>
+	</target>
+
+	<target name="run-configure">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec dir="${release.dir}/gsdl" executable="${release.dir}/gsdl/configure"/>
+		</if>
+	</target>
+
+	<target name="makefiles-add-static">
+		<if><bool><istrue value="${execute}"/></bool>
+			<rsr file="${release.dir}/gsdl/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
+			<rsr file="${release.dir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
+			<rsr file="${release.dir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
+			<rsr file="${release.dir}/gsdl/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml.{2}EXEEXT.{1}" replacement="-o rtftohtml\$(EXEEXT) -static" />
+		</if>
+	</target>
+
+	<target name="run-make">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec dir="${release.dir}/gsdl" executable="make"/>
+		</if>
+	</target>
+
+	<target name="fix-wget">
+		<if><bool><istrue value="${execute}"/></bool>
+			<delete file="${release.dir}/gsdl/packages/wget/wget-1.9/src/wget"/>
+			<exec dir="${release.dir}/gsdl/packages/wget/wget-1.9/src" executable="gcc"><arg line="-O2 -Wall -Wno-implicit -o wget cmpt.o connect.o convert.o cookies.o ftp.o ftp-basic.o ftp-ls.o ftp-opie.o hash.o headers.o host.o html-parse.o html-url.o http.o init.o log.o main.o gen-md5.o netrc.o progress.o rbuf.o recur.o res.o retr.o safe-ctype.o snprintf.o gen_sslfunc.o url.o utils.o version.o  -lssl -lcrypto -ldl -static"/></exec>
+		</if>
+	</target>
+	
+
+	<target name="run-make-install">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec dir="${release.dir}/gsdl" executable="make"><arg value="install"/></exec>
+		</if>
+	</target>
+
+	<target name="copy-library-oai">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec executable="cp"><arg line="${release.dir}/gsdl/cgi-bin/library ${release.dir}/gsdl/bin/linux/library"/></exec>
+			<exec executable="cp"><arg line="${release.dir}/gsdl/cgi-bin/oaiserver ${release.dir}/gsdl/bin/linux/oaiserver"/></exec>
+		</if>
+	</target>
+
+	<target name="strip-execs">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec dir="${release.dir}/gsdl/bin/linux" executable="find">
+				<arg line="! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
+			</exec>
+		</if>
+	</target>
+
+
+
+	<target name="mac-checkout-gsdl">
+		<if><bool><istrue value="${execute}"/></bool>
+			<echo level="info">create release directory, if absent</echo>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle if [ ! -e ${mac.release.dir} ]; then mkdir ${mac.release.dir}; fi" /></exec>
+
+			<echo level="info">checkout gsdl</echo>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}; PATH=$PATH:/usr/local/bin svn co ${svn.root}/gsdl/${branch.path} gsdl" /></exec>
+			<echo level="info">checkout indexers</echo>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/gsdl; PATH=$PATH:/usr/local/bin svn co ${svn.root}/indexers/${branch.path} indexers" /></exec>
+
+		</if>
+	</target>
+
+	<target name="mac-set-version-numbers">
+		<if><bool><istrue value="${execute}"/></bool>
+
+
+			<echo level="info">bring over the files that need changing</echo>
+			<exec executable="/usr/bin/scp"><arg line="${username}@shuttle:${mac.release.dir}/gsdl/lib/gsdlconf.h ${basedir}/temp" /></exec>
+			<exec executable="/usr/bin/scp"><arg line="${username}@shuttle:${mac.release.dir}/gsdl/Install.sh ${basedir}/temp" /></exec>
+
+			<echo level="info">change them</echo>
+			<echo level="info">Set version number in lib/gsdlconf.h</echo>
+			<rsr file="${basedir}/temp/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.\...&quot;" replacement="$1 &quot;${version}&quot;" />
+			<echo level="info">Set version number in Install.sh</echo>
+			<rsr file="${basedir}/temp/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
+
+			<echo level="info">send them back</echo>
+			<exec executable="/usr/bin/scp"><arg line="${basedir}/temp/Install.sh ${username}@shuttle:${mac.release.dir}/gsdl" /></exec>
+			<exec executable="/usr/bin/scp"><arg line="${basedir}/temp/gsdlconf.h ${username}@shuttle:${mac.release.dir}/gsdl/lib" /></exec>
+
+		</if>
+	</target>
+
+	<target name="mac-run-configure">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/gsdl; PATH=$PATH:/usr/local/bin JAVA_HOME=/Library/Java/Home ./configure --with-gdbm=/Users/kjdon/gdbm-1.8.3" /></exec>
+		</if>
+	</target>
+
+
+	<target name="mac-tweak-makefiles">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<!-- src/recpt/Makefile -->
+			<exec executable="/usr/bin/ssh">
+				<arg value="${username}:${password}@shuttle"/>
+				<arg value="/Users/oranfry/bin/fvsr.sh"/>
+				<arg value="${mac.release.dir}/gsdl/src/recpt/Makefile"/>
+				<arg value="GDBM_LIBS"/>
+				<arg value="'-L/Users/kjdon/gdbm-1.8.3/lib -lgdbm'"/>
+				<arg value="'/Users/kjdon/gdbm-1.8.3/lib/libgdbm.a'"/>
+			</exec>
+
+			<!-- src/oaiservr/Makefile -->
+			<exec executable="/usr/bin/ssh">
+				<arg value="${username}:${password}@shuttle"/>
+				<arg value="/Users/oranfry/bin/fvsr.sh"/>
+				<arg value="${mac.release.dir}/gsdl/src/oaiservr/Makefile"/>
+				<arg value="GDBM_LIBS"/>
+				<arg value="'-L/Users/kjdon/gdbm-1.8.3/lib -lgdbm'"/>
+				<arg value="'/Users/kjdon/gdbm-1.8.3/lib/libgdbm.a'"/>
+			</exec>
+
+			<!-- src/db2txt/Makefile -->
+			<exec executable="/usr/bin/ssh">
+				<arg value="${username}:${password}@shuttle"/>
+				<arg value="/Users/oranfry/bin/fvsr.sh"/>
+				<arg value="${mac.release.dir}/gsdl/src/db2txt/Makefile"/>
+				<arg value="LIBS"/>
+				<arg value="'-L/Users/kjdon/gdbm-1.8.3/lib -lgdbm'"/>
+				<arg value="'/Users/kjdon/gdbm-1.8.3/lib/libgdbm.a'"/>
+			</exec>
+
+			<!-- src/txt2db/Makefile -->
+			<exec executable="/usr/bin/ssh">
+				<arg value="${username}:${password}@shuttle"/>
+				<arg value="/Users/oranfry/bin/fvsr.sh"/>
+				<arg value="${mac.release.dir}/gsdl/src/txt2db/Makefile"/>
+				<arg value="LIBS"/>
+				<arg value="'-L/Users/kjdon/gdbm-1.8.3/lib -lgdbm'"/>
+				<arg value="'/Users/kjdon/gdbm-1.8.3/lib/libgdbm.a'"/>
+			</exec>
+
+			<!-- src/recpt/Makefile -->
+			<exec executable="/usr/bin/ssh">
+				<arg value="${username}:${password}@shuttle"/>
+				<arg value="/Users/oranfry/bin/fvsr.sh"/>
+				<arg value="${mac.release.dir}/gsdl/src/recpt/Makefile"/>
+				<arg value="LC_LIBS"/>
+				<arg value="'-L../../packages/expat/lib -lexpat'"/>
+				<arg value="'../../packages/expat/lib/libexpat.a'"/>
+			</exec>
+
+			<!-- src/oaiservr/Makefile -->
+			<exec executable="/usr/bin/ssh">
+				<arg value="${username}:${password}@shuttle"/>
+				<arg value="/Users/oranfry/bin/fvsr.sh"/>
+				<arg value="${mac.release.dir}/gsdl/src/oaiservr/Makefile"/>
+				<arg value="LIBS"/>
+				<arg value="'-L../../packages/expat/lib -lexpat'"/>
+				<arg value="'../../packages/expat/lib/libexpat.a'"/>
+			</exec>
+
+		</if>
+	</target>
+
+	<target name="mac-make">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/gsdl; PATH=$PATH:/usr/local/bin JAVA_HOME=/Library/Java/Home make" /></exec>
+		</if>
+	</target>
+
+	<target name="mac-make-install">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/gsdl; PATH=$PATH:/usr/local/bin JAVA_HOME=/Library/Java/Home make install" /></exec>
+		</if>
+	</target>
+
+	<target name="mac-copy-library-oai">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cp ${mac.release.dir}/gsdl/cgi-bin/library ${mac.release.dir}/gsdl/bin/darwin/library" /></exec>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cp ${mac.release.dir}/gsdl/cgi-bin/oaiserver ${mac.release.dir}/gsdl/bin/darwin/oaiserver" /></exec>
+		</if>
+	</target>
+
+	<target name="mac-strip-execs">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/gsdl; strip bin/darwin/*" /></exec>
+		</if>
+	</target>
+
+	<target name="mac-send-files-to-linux-machine">
+		<if><bool><istrue value="${execute}"/></bool>
+			<delete dir="${release.dir}/other-platforms/mac-bin-darwin"/>
+			<exec executable="/usr/bin/scp"><arg line="-r ${username}@shuttle:${mac.release.dir}/gsdl/bin/darwin ${release.dir}/other-platforms/mac-bin-darwin" /></exec>
+		</if>
+	</target>
+
+
+	<target name="mac-prepare-to-build-demo-collection">
+		<if><bool><istrue value="${execute}"/></bool>
+			<echo level="info">delete the old demo-collection greenstone</echo>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle rm -rf ${mac.release.dir}/demo-collection" /></exec>
+
+			<echo level="info">re-create it</echo>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cp -r ${mac.release.dir}/gsdl ${mac.release.dir}/demo-collection" /></exec>
+		</if>
+	</target>
+
+	<target name="mac-build-demo-collection">
+		<if><bool><istrue value="${execute}"/></bool>
+			<exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle export PATH=$PATH:/usr/local/bin export JAVA_HOME=/Library/Java/Home; cd ${mac.release.dir}/demo-collection; . setup.bash; import.pl --removeold demo; buildcol.pl --removeold demo" /></exec>
+			<exec executable="/usr/bin/scp"><arg line="${username}@shuttle:${mac.release.dir}/demo-collection/collect/demo/building/text/demo.bdb ${release.dir}/gsdl/collect/demo/index/text" /></exec>
+		</if>
+	</target>
+
+
+
+
+
+
+	<!-- OTHER ROOT TARGETS -->
+	<target name="initial-setup-init">
+
+		<echo level="info">CHECKING PRE-CONDITIONS</echo>
+		<echo level="info"/>
+
+		<!-- version number -->
+		<echo level="info">Checking if version number is set...</echo>
+		<if>
+			<bool>
+				<or>
+					<not><isset property="version"/></not>
+					<not><isset property="version.minor"/></not>
+				</or>
+			</bool>
+			<echo level="error">No, not set</echo>
+			<echo level="error">Please specify a version number</echo>
+			<echo level="error">E.g., ant -Dversion=3.03 -Dversion.minor=03 create-release</echo>
+			<echo level="error">or,   ant -Dversion=trunk -Dversion.minor=03 create-release</echo>
+			<fail>Version number not set</fail>
+		</if>
+		<echo level="info">Version number: ${version}</echo>
+		<property name="app.version" value="${version}"/>
+		<echo level="info"/>
+
+		<!-- where to put the release -->
+		<echo level="info">Determining where to put the release...</echo>
+		<if>
+			<bool>
+				<or>
+					<not><isset property="release.dir"/></not>
+					<not><isset property="mac.release.dir"/></not>
+					<not><isset property="windows.release.dir"/></not>
+				</or>
+				
+			</bool>
+			<echo level="error">No release directory specified.</echo>
+			<echo level="error">Please specify release directory on the command line.</echo>
+			<echo level="error">E.g., ant -Drelease.dir=/research/me/releases/3.03 -Dmac.release.dir=/Users/me/releases/3.03 -Dwindows.release.dir=c:\research\me\releases\3.03 create-release</echo>
+			<fail>Release directorys not set</fail>
+		</if>
+		<echo level="info">Release directory: ${release.dir}</echo>
+		<echo level="info">Mac release directory: ${mac.release.dir}</echo>
+		<echo level="info">Windows release directory: ${windows.release.dir}</echo>
+		<echo level="info"/>
+
+		<!-- check start from -->
+		<echo level="info">Checking if we are resuming from a given target...</echo>
+		<if>
+			<bool>
+				<not><isset property="resume.from"/></not>
+			</bool>
+			<echo level="info">No, start from the beginning</echo>
+			<property name="resume.from" value="1"/>
+			<else>
+				<echo level="info">Yes, resuming from ${resume.from}</echo>
+			</else>
+		</if>
+		<echo level="info"/>
+
+		<!-- check resume mode-->
+		<echo level="info">Determining resume mode...</echo>
+		<if>
+			<bool>
+				<not><isset property="resume.mode"/></not>
+			</bool>
+			<echo level="info">Mode not set, defaulting to 'fallthrough'</echo>
+			<property name="resume.mode" value="fallthrough"/>
+			<else>
+				<echo level="info">Mode set to ${resume.mode}</echo>
+				<if>
+					<bool>
+						<and>
+							<not><equals arg1="${resume.mode}" arg2="descend"/></not>
+							<not><equals arg1="${resume.mode}" arg2="fallthrough"/></not>
+						</and>
+					</bool>
+					<echo level="error">You have not specified a valid resume mode.</echo>
+					<echo level="error">Valid modes are 'fallthrough' and 'descend'.</echo>
+					<fail>You have not specified a valid resume mode.</fail>
+				</if>
+			</else>
+		</if>
+		<echo level="info"/>
+
+
+		<!-- execute target code or just traverse tree -->
+		<echo level="info">Determining execute mode...</echo>
+		<if>
+			<bool>
+				<not><isset property="execute"/></not>
+			</bool>
+			<echo level="info">Execute not set, defaulting to 'true'</echo>
+			<property name="execute" value="true"/>
+			<else>
+				<echo level="info">Execute set to ${execute}</echo>
+				<if>
+					<bool>
+						<and>
+							<not><equals arg1="${execute}" arg2="true"/></not>
+							<not><equals arg1="${execute}" arg2="false"/></not>
+						</and>
+					</bool>
+					<echo level="error">You have not specified a valid value for execute.</echo>
+					<echo level="error">Valid values are 'true' and 'false'.</echo>
+					<fail>You have not specified a valid value for execute.</fail>
+				</if>
+			</else>
+		</if>
+
+		<echo level="info"/>
+
+
+		<!-- the trunk or a branch -->
+		<echo level="info">Determining the branch path...</echo>
+		<if>
+			<bool>
+				<equals arg1="trunk" arg2="${version}"/>
+			</bool>
+			<property name="branch.path" value="trunk"/>
+
+			<else>
+				<property name="branch.path" value="branches/${version}"/>
+			</else>
+		</if>
+		<echo level="info">Branch Path: ${branch.path}</echo>
+		<echo level="info"/>
+
+		<!-- get current month and year-->
+		<exec executable="date" outputproperty="current.month">
+			<arg value="+%b"/>
+		</exec>
+		<exec executable="date" outputproperty="current.year">
+			<arg value="+%Y"/>
+		</exec>
+		<echo level="info">Current Month: ${current.month}</echo>
+		<echo level="info">Current Year: ${current.year}</echo>
+
+	</target>
+
+
+	<!-- INITIAL-SETUP TARGET -->
+	<target name="initial-setup"   depends="initial-setup-init">
+		<if><bool><not><equals arg1="${version}" arg2="trunk"/></not></bool>
+			<addressedcall target="create-branches"/>
+			<addressedcall target="set-all-version-numbers"/>
+
+			<else>
+					<echo level="info">No need to do initial setup on the trunk</echo>
+					<echo level="info">Initial setup is only done when creating a release from branches</echo>
+			</else>
+		</if>
+	</target>
+
+	<!-- first level targets -->
+	<target name="create-branches">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<if>
+				<bool>
+					<and>
+						<isset property="branch.path" />
+						<not><equals arg1="${branch.path}" arg2=""/></not>
+						<not><equals arg1="${branch.path}" arg2="trunk"/></not>
+					</and>
+				</bool>
+				<svn>
+					<copy srcUrl="${svn.root}/gli/trunk" destUrl="${svn.root}/gli/${branch.path}" message="creating a branch for the ${version} release" />
+					<copy srcUrl="${svn.root}/documentation/trunk" destUrl="${svn.root}/documentation/${branch.path}" message="creating a branch for the ${version} release" />
+					<copy srcUrl="${svn.root}/indexers/trunk" destUrl="${svn.root}/indexers/${branch.path}" message="creating a branch for the ${version} release" />
+					<copy srcUrl="${svn.root}/gsdl/trunk" destUrl="${svn.root}/gsdl/${branch.path}" message="creating a branch for the ${version} release" />
+				</svn>
+				<else><fail>please set the branch.path, e.g., -Dbranch.path=branches/2.75</fail></else>
+			</if>
+
+		</if>
+	</target>
+
+	<target name="set-all-version-numbers">
+		<addressedcall target="checkout-gsdl-for-version-numbers"/>
+		<addressedcall target="change-version-numbers"/>
+		<addressedcall target="commit-version-numbers"/>
+	</target>
+
+
+
+
+	<!-- second level targets -->
+	<target name="checkout-gsdl-for-version-numbers">
+		<if><bool><istrue value="${execute}"/></bool>
+			<svn>
+				<checkout url="${svn.root}/gsdl/${branch.path}" destPath="${release.dir}/gsdl-for-version-numbers"/>
+			</svn>
+			<svn>
+				<checkout url="${svn.root}/indexers/${branch.path}" destPath="${release.dir}/gsdl-for-version-numbers/indexers"/>
+			</svn>
+			<svn>
+				<checkout url="${svn.root}/gli/${branch.path}" destPath="${release.dir}/gsdl-for-version-numbers/gli"/>
+			</svn>
+		</if>
+	</target>
+
+
+	<target name="change-version-numbers">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<echo level="info">Set version number in lib/gsdlconf.h</echo>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.\...&quot;" replacement="$1 &quot;${version}&quot;" />
+
+			<echo level="info">Set version number in Install.sh</echo>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
+
+			<!-- AboutDialog.Date -->
+			<echo level="info">AboutDialog.Date properties</echo>
+			<!-- ar -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.ar"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ar.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ar.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.ar} ${current.year})" />
+			<echo level="info">ar: (${month.ar} ${current.year})</echo>
+			<!-- ca -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.ca"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ca.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ca.properties" pattern="AboutDialog.Date:\(.+ de \d{4}\)" replacement="AboutDialog.Date:(${month.ca} de ${current.year})" />
+			<echo level="info">ca: (${month.ca} de ${current.year})</echo>
+			<!-- el -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.el"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_el.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_el.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.el} ${current.year})" />
+			<echo level="info">el: (${month.el} ${current.year})</echo>
+			<!-- es -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.es"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_es.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_es.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.es} ${current.year})" />
+			<echo level="info">es: (${month.es} ${current.year})</echo>
+			<!-- fr -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.fr"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_fr.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_fr.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.fr} ${current.year})" />
+			<echo level="info">fr: (${month.fr} ${current.year})</echo>
+			<!-- lv -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.lv"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_lv.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_lv.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.lv} ${current.year})" />
+			<echo level="info">lv: (${month.lv} ${current.year})</echo>
+			<!-- mr -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.mr"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_mr.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_mr.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.mr} ${current.year})" />
+			<echo level="info">mr: (${month.mr} ${current.year})</echo>
+			<!-- default -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.default"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.default} ${current.year})" />
+			<echo level="info">default: (${month.default} ${current.year})</echo>
+			<!-- ro -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.ro"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ro.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ro.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.ro} ${current.year})" />
+			<echo level="info">ro: (${month.ro} ${current.year})</echo>
+			<!-- ru -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.ru"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ru.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_ru.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.ru} ${current.year})" />
+			<echo level="info">ru: (${month.ru} ${current.year})</echo>
+			<!-- vi -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.vi"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_vi.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_vi.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.vi} ${current.year})" />
+			<echo level="info">vi: (${month.vi} ${current.year})</echo>
+			<!-- zh -->
+			<exec executable="${basedir}/bin/gsp.sh" outputproperty="month.zh"><arg value="Dates.${current.month}"/><arg value="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_zh.properties"/></exec>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/dictionary_zh.properties" pattern="AboutDialog.Date:\(.+ \d{4}\)" replacement="AboutDialog.Date:(${month.zh} ${current.year})" />
+			<echo level="info">zh: (${month.zh} ${current.year})</echo>
+
+			<!-- readmes at /home/nzdl/gsdl-docs - do manually -->
+			<!-- es -->
+			<!--<echo level="info">Updating spanish README at /home/nzdl/gsdl-docs/READMEes.txt</echo>
+			<rsr file="/home/nzdl/gsdl-docs/READMEes.txt" pattern="(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" />
+			<rsr file="/home/nzdl/gsdl-docs/READMEes.txt" pattern="(Versi.?n\s*)(.*)" replacement="$1${version}" />-->
+			<!-- fr -->
+			<!--<echo level="info">Updating french README at /home/nzdl/gsdl-docs/READMEfr.txt</echo>
+			<rsr file="/home/nzdl/gsdl-docs/READMEfr.txt" pattern="(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" />
+			<rsr file="/home/nzdl/gsdl-docs/READMEfr.txt" pattern="(Version\s*)(.*)" replacement="$1${version}" />-->
+			<!-- en -->
+			<!--<echo level="info">Updating english README at /home/nzdl/gsdl-docs/READMEen.txt</echo>
+			<rsr file="/home/nzdl/gsdl-docs/READMEen.txt" pattern="(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
+			<rsr file="/home/nzdl/gsdl-docs/READMEen.txt" pattern="(Version\s*)(.*)" replacement="$1${version}" />-->
+
+			<!-- ru -->
+			<!--<echo level="info">Updating russian README at /home/nzdl/gsdl-docs/READMEru.txt-koi8-r</echo>
+			<rsr file="/home/nzdl/gsdl-docs/READMEru.txt-koi8-r" pattern="(Ã€ÃÃÃ\s*)(.*)" replacement="$1${month.ru} ${current.year}" />
+			<rsr file="/home/nzdl/gsdl-docs/READMEru.txt-koi8-r" pattern="(Ã·Ã
+ÃÃÃÃ\s*)(.*)" replacement="$1${version}" />-->
+
+			<!-- change the version number in gli gatherer-->
+			<echo level="info">Changing version number in gli Gatherer</echo>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${version}&quot;"/>
+
+			<!-- in classes/xml/config.xml -->
+			<echo level="info">Changing configuration version in gli/classes/xml/config.xml</echo>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/xml/config.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}$2"/>
+
+			<!-- in classes/xml/configRemote.xml -->
+			<echo level="info">Changing configuration version in gli/classes/xml/configRemote.xml</echo>
+			<rsr file="${release.dir}/gsdl-for-version-numbers/gli/classes/xml/configRemote.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}$2"/>
+
+
+			<!-- in /home/nzdl/gsdl-docs/Support.htm -->
+			<echo level="info">Changing version in /home/nzdl/gsdl-docs/Support.htm</echo>
+			<rsr file="/home/nzdl/gsdl-docs/Support.htm" pattern="^(\s*Greenstone Digital Library version: ).*(&lt;br&gt;.*)" replacement="$1${version}$2"/>
+			<rsr file="/home/nzdl/gsdl-docs/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/>
+			
+			<echo level="info"/>
+			<echo level="info"/>
+
+			<echo level="info">Please update the READMEs at /home/nzdl/gsdl-docs manually</echo>
+			<echo level="info">This can't be done automatically because the character encoding will get messed up</echo>
+			<echo>Use these month strings:</echo>
+			<echo>En: ${month.default} ${current.year}</echo>
+			<echo>Fr: ${month.fr} ${current.year}</echo>
+			<echo>Es: ${month.es} ${current.year}</echo>
+			<echo>Ru: ${month.ru} ${current.year}</echo>
+			<echo level="info"/>
+			<echo level="info">You could also check all version number edits have been performed properly</echo>
+			<echo level="info"/>
+			<input addproperty="windows.compilation.done" validargs="done">Type 'done' when you have finished.</input>
+
+		</if>
+	</target>
+
+	<target name="commit-version-numbers">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<svn>
+				<commit dir="${release.dir}/gsdl-for-version-numbers" message="checking-in version number changes"/>
+				<commit dir="${release.dir}/gsdl-for-version-numbers/gli" message="checking-in version number changes"/>
+			</svn>
+
+		</if>
+	</target>
+
+
+</project>
