Changeset 16951

Show
Ignore:
Timestamp:
21.08.2008 16:28:44 (11 years ago)
Author:
oranfry
Message:

dont download or extract packages that have already been prepared

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/build.xml

    r16936 r16951  
    647647  <target name="prepare-tomcat" depends="init,setup-proxy" if="tomcat.islocal"> 
    648648 
    649     <!-- check that packages dir is there --> 
    650     <mkdir dir="${packages.home}"/> 
    651     <get src="http://www.greenstone.org/gs3files/${tomcat.version}.zip" 
    652       dest="${packages.home}/${tomcat.version}.zip" 
    653       usetimestamp="true"/> 
    654     <unzip src="${packages.home}/${tomcat.version}.zip"  
    655       dest="${packages.home}"/> 
    656     <get src="http://www.greenstone.org/gs3files/${tomcat.version}-compat.zip" 
    657       dest="${packages.home}/${tomcat.version}-compat.zip" 
    658       usetimestamp="true"/> 
    659     <unzip src="${packages.home}/${tomcat.version}-compat.zip"  
    660       dest="${packages.home}"/> 
    661     <!-- delete any existing tomcat --> 
    662     <delete dir="${packages.home}/tomcat"/> 
    663     <move todir="${packages.home}/tomcat"> 
    664       <fileset dir="${packages.home}/${tomcat.version}"/> 
    665     </move> 
    666     <copy file="${basedir}/resources/tomcat/setclasspath.bat" 
    667       tofile="${packages.home}/tomcat/bin/setclasspath.bat" 
    668       overwrite="true"/> 
    669     <copy file="${basedir}/resources/tomcat/setclasspath.sh" 
    670       tofile="${packages.home}/tomcat/bin/setclasspath.sh" 
    671       overwrite="true"/> 
    672     <!-- make sure we have execute permission for the .sh files --> 
    673     <chmod dir="${packages.home}/tomcat/bin" perm="ugo+rx"  
    674       includes="*.sh"/>    
     649    <if> 
     650      <bool> 
     651        <not><available file="${packages.home}/tomcat/.flagfile"/></not> 
     652      </bool> 
     653 
     654      <!-- check that packages dir is there --> 
     655      <mkdir dir="${packages.home}"/> 
     656      <get src="http://www.greenstone.org/gs3files/${tomcat.version}.zip" 
     657        dest="${packages.home}/${tomcat.version}.zip" 
     658        usetimestamp="true"/> 
     659      <unzip src="${packages.home}/${tomcat.version}.zip"  
     660        dest="${packages.home}"/> 
     661      <get src="http://www.greenstone.org/gs3files/${tomcat.version}-compat.zip" 
     662        dest="${packages.home}/${tomcat.version}-compat.zip" 
     663        usetimestamp="true"/> 
     664      <unzip src="${packages.home}/${tomcat.version}-compat.zip"  
     665        dest="${packages.home}"/> 
     666      <!-- delete any existing tomcat --> 
     667      <delete dir="${packages.home}/tomcat"/> 
     668      <move todir="${packages.home}/tomcat"> 
     669        <fileset dir="${packages.home}/${tomcat.version}"/> 
     670      </move> 
     671      <copy file="${basedir}/resources/tomcat/setclasspath.bat" 
     672        tofile="${packages.home}/tomcat/bin/setclasspath.bat" 
     673        overwrite="true"/> 
     674      <copy file="${basedir}/resources/tomcat/setclasspath.sh" 
     675        tofile="${packages.home}/tomcat/bin/setclasspath.sh" 
     676        overwrite="true"/> 
     677      <!-- make sure we have execute permission for the .sh files --> 
     678      <chmod dir="${packages.home}/tomcat/bin" perm="ugo+rx"  
     679        includes="*.sh"/>    
     680 
     681      <echo file="${packages.home}/tomcat/.flagfile"> 
     682        the timestamp of this file is the time that tomcat was extracted from the zip files. 
     683        it is used to figure out whether the files need to be refreshed or not in `ant prepare-tomcat` 
     684      </echo> 
     685 
     686      <else> 
     687        <echo>Tomcat has been prepared, will not prepare</echo> 
     688        <echo>Delete ${packages.home}/tomcat/.flagfile to force refresh</echo> 
     689      </else> 
     690 
     691    </if> 
     692 
    675693  </target> 
    676694   
     
    767785  <!-- ======================= ant Targets ============================ -->  
    768786  <target name="prepare-ant" depends="init"> 
    769     <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip" 
    770       dest="${packages.home}/apache-ant-1.7.0-bin.zip" 
    771       usetimestamp="true"/> 
    772     <unzip src="${packages.home}/apache-ant-1.7.0-bin.zip" 
    773       dest="${packages.home}"/> 
    774     <move todir="${packages.home}/ant"> 
    775       <fileset dir="${packages.home}/apache-ant-1.7.0"/> 
    776     </move> 
     787    <if> 
     788      <bool> 
     789        <not><available file="${packages.home}/ant/.flagfile"/></not> 
     790      </bool> 
     791 
     792      <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip" 
     793        dest="${packages.home}/apache-ant-1.7.0-bin.zip" 
     794        usetimestamp="true"/> 
     795      <unzip src="${packages.home}/apache-ant-1.7.0-bin.zip" 
     796        dest="${packages.home}"/> 
     797      <move todir="${packages.home}/ant"> 
     798        <fileset dir="${packages.home}/apache-ant-1.7.0"/> 
     799      </move> 
     800      <echo file="${packages.home}/ant/.flagfile"> 
     801        the timestamp of this file is the time that ant was extracted from the zip files. 
     802        it is used to figure out whether the files need to be refreshed or not in `ant prepare-ant` 
     803      </echo> 
     804 
     805      <else> 
     806        <echo>Ant has been prepared, will not prepare</echo> 
     807        <echo>Delete ${packages.home}/ant/.flagfile to force refresh</echo> 
     808      </else> 
     809 
     810    </if> 
    777811  </target> 
    778812 
     
    780814 
    781815  <target name="prepare-axis" depends="init"> 
    782     <get src="http://www.greenstone.org/gs3files/${axis.zip.version}" 
    783       dest="${packages.home}/${axis.zip.version}" 
    784       usetimestamp="true"/> 
    785     <unzip src="${packages.home}/${axis.zip.version}" 
    786       dest="${packages.home}"/> 
    787     <move todir="${packages.home}/axis"> 
    788       <fileset dir="${packages.home}/${axis.dir.version}"/> 
    789     </move> 
    790     <!-- install axis into greenstone web app --> 
    791     <copy todir="${web.lib}"> 
    792       <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/lib"> 
    793         <include name="*.jar"/> 
    794       </fileset> 
    795     </copy> 
    796     <copy todir="${web.home}"> 
    797       <fileset dir="${packages.home}/axis/webapps/axis/"> 
    798         <include name="*.jsp"/> 
    799         <include name="*.jws"/> 
    800       </fileset> 
    801     </copy> 
    802     <copy tofile="${web.home}/axis.html" file="${packages.home}/axis/webapps/axis/index.html"/> 
    803     <copy todir="${web.classes}"> 
    804       <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/classes"> 
    805         <include name="*.properties"/> 
    806       </fileset> 
    807     </copy> 
     816 
     817    <if> 
     818      <bool> 
     819        <not><available file="${packages.home}/axis/.flagfile"/></not> 
     820      </bool> 
     821 
     822      <get src="http://www.greenstone.org/gs3files/${axis.zip.version}" 
     823        dest="${packages.home}/${axis.zip.version}" 
     824        usetimestamp="true"/> 
     825      <unzip src="${packages.home}/${axis.zip.version}" 
     826        dest="${packages.home}"/> 
     827      <move todir="${packages.home}/axis"> 
     828        <fileset dir="${packages.home}/${axis.dir.version}"/> 
     829      </move> 
     830      <!-- install axis into greenstone web app --> 
     831      <copy todir="${web.lib}"> 
     832        <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/lib"> 
     833          <include name="*.jar"/> 
     834        </fileset> 
     835      </copy> 
     836      <copy todir="${web.home}"> 
     837        <fileset dir="${packages.home}/axis/webapps/axis/"> 
     838          <include name="*.jsp"/> 
     839          <include name="*.jws"/> 
     840        </fileset> 
     841      </copy> 
     842      <copy tofile="${web.home}/axis.html" file="${packages.home}/axis/webapps/axis/index.html"/> 
     843      <copy todir="${web.classes}"> 
     844        <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/classes"> 
     845          <include name="*.properties"/> 
     846        </fileset> 
     847      </copy> 
     848      <echo file="${packages.home}/axis/.flagfile"> 
     849        the timestamp of this file is the time that axis was extracted from the zip files. 
     850        it is used to figure out whether the files need to be refreshed or not in `ant prepare-axis` 
     851      </echo> 
     852 
     853      <else> 
     854        <echo>Axis has been prepared, will not prepare</echo> 
     855        <echo>Delete ${packages.home}/axis/.flagfile to force refresh</echo> 
     856      </else> 
     857 
     858    </if> 
    808859  </target> 
    809860 
     
    15931644 
    15941645  <target name="prepare-gdbm" depends="init" if="install.gdbm"> 
    1595     <get src="http://www.greenstone.org/gs3files/${gdbm.version}.tar.gz" 
    1596       dest="${src.packages.home}/${gdbm.version}.tar.gz"  usetimestamp="true"/> 
    1597     <untar compression= "gzip" src="${src.packages.home}/${gdbm.version}.tar.gz" dest="${src.packages.home}" />   
    1598     <chmod dir="${src.packages.home}/${gdbm.version}" perm="ugo+wrx" includes="**" /> 
    1599     <antcall target="configure-gdbm" /> 
    1600     <antcall target="compile-gdbm" />  
     1646 
     1647    <if> 
     1648      <bool> 
     1649        <not><available file="${src.packages.home}/${gdbm.version}/.flagfile"/></not> 
     1650      </bool> 
     1651 
     1652      <get src="http://www.greenstone.org/gs3files/${gdbm.version}.tar.gz" 
     1653        dest="${src.packages.home}/${gdbm.version}.tar.gz" usetimestamp="true"/> 
     1654      <untar compression= "gzip" src="${src.packages.home}/${gdbm.version}.tar.gz" dest="${src.packages.home}" /> 
     1655      <echo file="${src.packages.home}/${gdbm.version}/.flagfile"> 
     1656        the timestamp of this file is the time that gdbm was extracted from the tar files. 
     1657        it is used to figure out whether the files need to be refreshed or not in `ant prepare-gdbm` 
     1658      </echo> 
     1659      <chmod dir="${src.packages.home}/${gdbm.version}" perm="ugo+wrx" includes="**" /> 
     1660      <antcall target="configure-gdbm" /> 
     1661      <antcall target="compile-gdbm" /> 
     1662 
     1663     <else> 
     1664       <echo>GDBM has been prepared, will not prepare</echo> 
     1665       <echo>Delete ${src.packages.home}/${gdbm.version}/.flagfile to force a fresh prepare</echo> 
     1666     </else> 
     1667 
     1668    </if> 
     1669 
    16011670  </target>   
    16021671