Index: /greenstone3/trunk/build.xml
===================================================================
--- /greenstone3/trunk/build.xml	(revision 15836)
+++ /greenstone3/trunk/build.xml	(revision 15837)
@@ -503,11 +503,15 @@
   </target>
 
-<!--
+
 <target name="prepare-collections" depends="init">
-    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
-<echo message="installing collections..."/>
-<antcall target="gs2mgdemo-install"/>
-<antcall target="gs2mgppdemo-install"/>
-<antcall target="gberg-install"/>
+  <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
+  <property name="import.zip" value="import.zip"/>
+  <property name="metadata.zip" value="metadata.zip"/>
+  <property name="index.zip" value="index/index.zip"/>
+
+  <echo message="installing collections..."/>
+  <antcall target="gs2mgdemo-install"/>
+  <antcall target="gs2mgppdemo-install"/>
+  <antcall target="gberg-install"/>
 
 </target>
@@ -515,19 +519,16 @@
 <target name="gs2mgdemo-prepare" if="collect.dir">
  <property name="gs2mgdemo.dir" value="${collect.dir}/gs2mgdemo"/>
- <property name="gs2mgdemo.import.zip" value="$import.zip"/>
-  <property name="gs2mgdemo.metadata.zip" value="$metadata.zip"/>
-  <property name="gs2mgdemo.index.zip" value="index/index.zip"/>
-
+ 
 <fileset id="gs2mgdemofiles" dir="${gs2mgdemo.dir}">
-	<include name="${gs2mgdemo.import.zip}"/>
-	<include name="${gs2mgdemo.metadata.zip}"/>
-	<include name="${gs2mgdemo.index.zip}"/>
+	<include name="${import.zip}"/>
+	<include name="${metadata.zip}"/>
+	<include name="${index.zip}"/>
 </fileset>
 
 <condition property="gs2mgdemo.present">
     <and>
-	<available file="${gs2mgdemo.import.zip}"/>
-	<available file="${gs2mgdemo.metadata.zip}"/>
-        <available file="${gs2mgdemo.index.zip}"/>
+	<available file="${gs2mgdemo.dir}/${import.zip}"/>
+	<available file="${gs2mgdemo.dir}/${metadata.zip}"/>
+        <available file="${gs2mgdemo.dir}/${index.zip}"/>
     </and>
   </condition>
@@ -535,31 +536,28 @@
 
 <target name="gs2mgdemo-install" if="gs2mgdemo.present"  depends="gs2mgdemo-prepare">
-<echo> installing gs2mgdemo</echo>
-<unzip dest="${gs2mgdemo.dir}">
+  <echo> installing gs2mgdemo</echo>
+  <unzip dest="${gs2mgdemo.dir}" src="${gs2mgdemo.dir}/${import.zip}" />
+  <unzip dest="${gs2mgdemo.dir}" src="${gs2mgdemo.dir}/${metadata.zip}" />
+  <unzip dest="${gs2mgdemo.dir}/index" src="${gs2mgdemo.dir}/${index.zip}" />
+  <delete>
 	<fileset refid="gs2mgdemofiles"/>
-</unzip>
-<delete>
-	<fileset refid="gs2mgdemofiles"/>
-</delete>
-<echo>collection gs2mgdemo installed</echo>
+  </delete>
+  <echo>collection gs2mgdemo installed</echo>
 </target>
 
 <target name="gs2mgppdemo-prepare" if="collect.dir">
  <property name="gs2mgppdemo.dir" value="${collect.dir}/gs2mgppdemo"/>
- <property name="gs2mgppdemo.import.zip" value="${gs2mgppdemo.dir}/import.zip"/>
-  <property name="gs2mgppdemo.metadata.zip" value="${gs2mgppdemo.dir}/metadata.zip"/>
-  <property name="gs2mgppdemo.index.zip" value="${gs2mgppdemo.dir}/index.zip"/>
-
+ 
 <fileset id="gs2mgppdemofiles" dir="${gs2mgppdemo.dir}">
-        <include name="${gs2mgppdemo.import.zip}"/>
-        <include name="${gs2mgppdemo.metadata.zip}"/>
-        <include name="${gs2mgppdemo.index.zip}"/>
+        <include name="${import.zip}"/>
+	<include name="${metadata.zip}"/>
+	<include name="${index.zip}"/>
 </fileset>
 
 <condition property="gs2mgppdemo.present">
     <and>
-        <available file="${gs2mgppdemo.import.zip}"/>
-        <available file="${gs2mgppdemo.metadata.zip}"/>
-        <available file="${gs2mgppdemo.index.zip}"/>
+        <available file="${gs2mgppdemo.dir}/${import.zip}"/>
+	<available file="${gs2mgppdemo.dir}/${metadata.zip}"/>
+        <available file="${gs2mgppdemo.dir}/${index.zip}"/>
     </and>
   </condition>
@@ -567,25 +565,24 @@
 
 <target name="gs2mgppdemo-install" if="gs2mgppdemo.present" depends="gs2mgppdemo-prepare">
-<unzip dest="${gs2mgppdemo.dir}">
+  <unzip dest="${gs2mgppdemo.dir}" src="${gs2mgppdemo.dir}/${import.zip}" />
+  <unzip dest="${gs2mgppdemo.dir}" src="${gs2mgppdemo.dir}/${metadata.zip}" />
+  <unzip dest="${gs2mgppdemo.dir}/index" src="${gs2mgppdemo.dir}/${index.zip}" />
+  <delete>
         <fileset refid="gs2mgppdemofiles"/>
-</unzip>
-<delete>
-        <fileset refid="gs2mgppdemofiles"/>
-</delete>
-<echo>collection gs2mgppdemo installed</echo>
+  </delete>
+  <echo>collection gs2mgppdemo installed</echo>
 </target>    
 
 <target name="gberg-prepare" if="collect.dir">
  <property name="gberg.dir" value="${collect.dir}/gberg"/>
- <property name="gberg.index.zip" value="${gberg.dir}/index.zip"/>
-
+ 
 <fileset id="gbergfiles" dir="${gberg.dir}">
-        <include name="${gberg.index.zip}"/>
+        <include name="${index.zip}"/>
 </fileset>
-<available file="${gberg.index.zip}" property="gberg.present"/>
+<available file="${gberg.dir}/${index.zip}" property="gberg.present"/>
 </target>
 
 <target name="gberg-install" if="gberg.present" depends="gberg-prepare">
-<unzip dest="${gberg.dir}">
+<unzip dest="${gberg.dir}/index">
         <fileset refid="gbergfiles"/>
 </unzip>
@@ -596,7 +593,7 @@
 </target>
 
--->
-
-
+
+
+<!--
   <target name="prepare-collections" depends="init">
     <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
@@ -626,4 +623,5 @@
     <delete file="${collect.dir}/gberg/index/index.zip"/>
   </target>
+-->
 
 
