Changeset 37020
- Timestamp:
- 2022-12-12T13:55:38+13:00 (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/build.xml
r36879 r37020 1115 1115 1116 1116 1117 <target name="install-runtime" depends="init,configure,configure-packages,configure-core,compile-web,compile-packages,compile-core,compile-classpath-jars "1117 <target name="install-runtime" depends="init,configure,configure-packages,configure-core,compile-web,compile-packages,compile-core,compile-classpath-jars,unpack-cgimodule" 1118 1118 description="Install (configure, compile, install) the runtime system. Needs either common-src or collection-building to have been installed first." /> 1119 1119 … … 1955 1955 <target name="update-web" depends="init,svnupdate-web,configure-web" 1956 1956 description="update only the web stuff (config files)"/> 1957 1958 1959 <!-- 1960 Newer versions of perl need CGI.pm placed in web/WEB-INF/cgi. 1961 We have a CGIModule.tar.gz in common-src/cgi-bin, that we can use for linux (unix) systems. 1962 1963 - from perl5.22, CGI.pm is not included, but GS3 needs it: 1964 https://stackoverflow.com/questions/45434990/why-does-this-code-have-issues-with-the-cgi-module 1965 - bash line to get perl version: https://www.unix.com/shell-programming-and-scripting/18267-version-perl-installed-my-system.html 1966 - run bash command using pipes with ant: https://stackoverflow.com/questions/1187402/ant-run-command-with-pipes 1967 - single quotes in XML use ' https://stackoverflow.com/questions/7388695/how-can-i-escape-double-quotes-in-ant 1968 - islessthan and isgreaterthan ant bool conditionals: https://stackoverflow.com/questions/7616159/apache-ant-less-than 1969 --> 1970 <condition property="cgimodule.exists"> 1971 <and> 1972 <available file="${web.home}/WEB-INF/cgi" type="dir"/> <!--Unavailable for custom web.home--> 1973 <available file="${web.home}/WEB-INF/cgi/CGI.pm" type="file"/> 1974 <available file="${web.home}/WEB-INF/cgi/Fh.pm" type="file"/> 1975 <available file="${web.home}/WEB-INF/cgi/CGI" type="dir"/> 1976 </and> 1977 </condition> 1978 1979 <target name="unpack-cgimodule" if="current.os.isunix" unless="cgimodule.exists"> 1980 <exec executable="bash" outputproperty="perl.major.version"> 1981 <arg value="-c"/> 1982 <arg line='"perl -v | awk '/This/ {print $4}' | sed -e 's/,//'"'/> 1983 </exec> 1984 <echo>Got perl major version: ${perl.major.version}</echo> 1985 <exec executable="bash" outputproperty="perl.min.version"> 1986 <arg value="-c"/> 1987 <arg line='"perl -v | awk '/This/ {print $6}' | sed -e 's/,//'"'/> 1988 </exec> 1989 <echo>Got perl minor version: ${perl.min.version}</echo> 1990 1991 <if> 1992 <bool> 1993 <or> 1994 <isgreaterthan arg1="${perl.major.version}" arg2="5"/> 1995 <and> 1996 <equals arg1="${perl.major.version}" arg2="5" trim="true"/> 1997 <islessthan arg1="${perl.minor.version}" arg2="22"/> 1998 </and> 1999 </or> 2000 </bool> 2001 <echo message="Unpacking the CGIModule needed for your perl version: ${perl.major.version}.${perl.min.version}" /> 2002 2003 <untar compression="gzip" 2004 src="${common.src.home}/cgi-bin/CGIModule.tar.gz" 2005 dest="${web.home}/WEB-INF/cgi"/> 2006 <move todir="${web.home}/WEB-INF/cgi" failonerror="false"> 2007 <!-- This fileset moves *contents* of directory CGIModule into destination dir web.home --> 2008 <fileset dir="${web.home}/WEB-INF/cgi/CGIModule"/> 2009 </move> 2010 <delete dir="${web.home}/WEB-INF/cgi/CGIModule"/> 2011 2012 </if> 2013 </target> 1957 2014 1958 2015 <!-- ============ Targets concerned with https certification ================ -->
Note:
See TracChangeset
for help on using the changeset viewer.