Commit 0570cead authored by Kapilraj Thangeswaran's avatar Kapilraj Thangeswaran

Implemented hdoc unzip function

parent 85dc3dc2
libdir=${basedir}/lib
xsldir=${basedir}/xsl
hdocdir=${basedir}/hdoc
inputPath=${basedir}/input
outputPath=${basedir}/output
<project name="hdoc_to_optim" default="unzipSource">
<property file="build.properties"/>
<target name="preparation">
<mkdir dir="${hdocdir}"/>
<chmod perm="777" dir="${hdocdir}"></chmod>
<delete dir="${outputPath}" />
<mkdir dir="${outputPath}"/>
<chmod perm="777" dir="${outputPath}"></chmod>
</target>
<target name="unzipSource" depends="preparation">
<fileset dir="${inputPath}" id="hdocFile">
<include name="*.hdoc"/>
</fileset>
<pathconvert property="hdocFilePath" pathsep="" refid="hdocFile" />
<echo>Entry file : ${hdocFilePath}</echo>
<!--unzips the hdoc to be converted-->
<unzip dest="${hdocdir}" src ="${hdocFilePath}"/>
</target>
<target name="clean" depends="unzipSource">
<delete file="get_content.ant"/>
<delete file="get_ressources.ant"/>
<delete dir="${hdocdir}" />
</target>
</project>
\ No newline at end of file
@echo off
set lib=lib
set ant=hdoc_to_mongo.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
#!/bin/sh
lib="lib"
ant="hdoc_to_mongo.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
vJavaCmd="java"
xCheckJava () {
vInputVarName=\$"$1"
vInputVarVal=`eval "expr \"$vInputVarName\" "`
if [ -z "$vInputVarVal" ];then
eval "$1=false"
return
fi
vSunJavaFound=`$vInputVarVal -version 2>&1 | grep -Eo -m 1 "(HotSpot)|(OpenJDK)"`
if [ "$vSunJavaFound" != "HotSpot" ] && [ "$vSunJavaFound" != "OpenJDK" ] ; then
eval "$1=false"
return
fi
}
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
vJavaCmd="$JAVA_HOME/bin/java"
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
echo "ERREUR: JRE de SUN introuvable. Veuillez déclarer la variable d'environnement JAVA_HOME."
exit 1
fi
fi
#Lancer la commande
scJarList="$lib/*"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment