Changeset 15190


Ignore:
Timestamp:
2008-04-14T15:48:51+12:00 (14 years ago)
Author:
dmn
Message:

fixing ticket 255, smarter ant code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/build.xml

    r15187 r15190  
    501501  </target>
    502502
     503<target name="prepare-collections" depends="init">
     504    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
     505<echo message="installing collections..."/>
     506<antcall target="gs2mgdemo-install"/>
     507<antcall target="gs2mgppdemo-install"/>
     508<antcall target="gberg-install"/>
     509
     510</target>
     511
     512<target name="gs2mgdemo-prepare" if="collect.dir">
     513 <property name="gs2mgdemo.dir" value="${collect.dir}/gs2mgdemo"/>
     514 <property name="gs2mgdemo.import.zip" value="${gs2mgdemo.dir}/import.zip"/>
     515  <property name="gs2mgdemo.metadata.zip" value="${gs2mgdemo.dir}/metadata.zip"/>
     516  <property name="gs2mgdemo.index.zip" value="${gs2mgdemo.dir}/index.zip"/>
     517
     518<fileset id="gs2mgdemofiles" dir="${gs2mgdemo.dir}">
     519    <include name="${gs2mgdemo.import.zip}"/>
     520    <include name="${gs2mgdemo.metadata.zip}"/>
     521    <include name="${gs2mgdemo.index.zip}"/>
     522</fileset>
     523
     524<condition property="gs2mgdemo.present">
     525    <and>
     526    <available file="${gs2mgdemo.import.zip}"/>
     527    <available file="${gs2mgdemo.metadata.zip}"/>
     528        <available file="${gs2mgdemo.index.zip}"/>
     529    </and>
     530  </condition>
     531</target>
     532
     533<target name="gs2mgdemo-install" if="gs2mgdemo.present"  depends="gs2mgdemo-prepare">
     534<echo> installing gs2mgdemo</echo>
     535<unzip dest="${gs2mgdemo.dir}">
     536    <fileset refid="gs2mgdemofiles"/>
     537</unzip>
     538<delete>
     539    <fileset refid="gs2mgdemofiles"/>
     540</delete>
     541<echo>collection gs2mgdemo installed</echo>
     542</target>
     543
     544<target name="gs2mgppdemo-prepare" if="collect.dir">
     545 <property name="gs2mgppdemo.dir" value="${collect.dir}/gs2mgppdemo"/>
     546 <property name="gs2mgppdemo.import.zip" value="${gs2mgppdemo.dir}/import.zip"/>
     547  <property name="gs2mgppdemo.metadata.zip" value="${gs2mgppdemo.dir}/metadata.zip"/>
     548  <property name="gs2mgppdemo.index.zip" value="${gs2mgppdemo.dir}/index.zip"/>
     549
     550<fileset id="gs2mgppdemofiles" dir="${gs2mgppdemo.dir}">
     551        <include name="${gs2mgppdemo.import.zip}"/>
     552        <include name="${gs2mgppdemo.metadata.zip}"/>
     553        <include name="${gs2mgppdemo.index.zip}"/>
     554</fileset>
     555
     556<condition property="gs2mgppdemo.present">
     557    <and>
     558        <available file="${gs2mgppdemo.import.zip}"/>
     559        <available file="${gs2mgppdemo.metadata.zip}"/>
     560        <available file="${gs2mgppdemo.index.zip}"/>
     561    </and>
     562  </condition>
     563</target>
     564
     565<target name="gs2mgppdemo-install" if="gs2mgppdemo.present" depends="gs2mgppdemo-prepare">
     566<unzip dest="${gs2mgppdemo.dir}">
     567        <fileset refid="gs2mgppdemofiles"/>
     568</unzip>
     569<delete>
     570        <fileset refid="gs2mgppdemofiles"/>
     571</delete>
     572<echo>collection gs2mgppdemo installed</echo>
     573</target>   
     574
     575<target name="gberg-prepare" if="collect.dir">
     576 <property name="gberg.dir" value="${collect.dir}/gberg"/>
     577 <property name="gberg.index.zip" value="${gberg.dir}/index.zip"/>
     578
     579<fileset id="gbergfiles" dir="${gberg.dir}">
     580        <include name="${gberg.index.zip}"/>
     581</fileset>
     582<available file="${gberg.index.zip}" property="gberg.present"/>
     583</target>
     584
     585<target name="gberg-install" if="gberg.present" depends="gberg-prepare">
     586<unzip dest="${gberg.dir}">
     587        <fileset refid="gbergfiles"/>
     588</unzip>
     589<delete>
     590        <fileset refid="gbergfiles"/>
     591</delete>
     592<echo>collection gberg installed</echo>
     593</target>
     594
     595
     596
     597
     598
     599
     600
     601
     602
     603
     604
     605
     606
     607
     608
     609
     610
     611<!--
    503612  <target name="prepare-collections" depends="init">
    504613    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
    505     <!-- gs2mgdemo -->
     614   
    506615    <unzip src="${collect.dir}/gs2mgdemo/import.zip"
    507616      dest="${collect.dir}/gs2mgdemo"/>
     
    513622    <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/>
    514623    <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/>
    515     <!-- gs2mgppdemo -->
     624   
    516625    <unzip src="${collect.dir}/gs2mgppdemo/import.zip"
    517626      dest="${collect.dir}/gs2mgppdemo"/>
     
    523632    <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/>
    524633    <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/>
    525     <!-- gberg -->
     634 
    526635    <unzip src="${collect.dir}/gberg/index/index.zip"
    527636      dest="${collect.dir}/gberg/index"/>
    528637    <delete file="${collect.dir}/gberg/index/index.zip"/>
    529638  </target>
    530 
     639-->
    531640 
    532641  <target name="configure-web" depends="init"
Note: See TracChangeset for help on using the changeset viewer.