Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
19a271cc
Commit
19a271cc
authored
Dec 17, 2015
by
Jean-Baptiste Martin
Browse files
rename myantce to optim_to_opale
parent
2e4639b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
optim_to_opale/myantce.ant
deleted
100644 → 0
View file @
2e4639b3
<?xml version="1.0" encoding="UTF-8"?>
<project
basedir=
"."
name=
"myantce"
default=
"main"
>
<property
name=
"in"
location=
"${basedir}/input"
/>
<property
name=
"out"
location=
"${basedir}/output"
/>
<property
name=
"tmp"
location=
"${basedir}/tmp"
/>
<property
name=
"xsl"
location=
"${basedir}/xsl"
/>
<property
name=
"lib"
location=
"${basedir}/lib"
/>
<property
name=
"log"
location=
"${basedir}/log"
/>
<property
name=
"optim_to_hdoc"
location=
"${basedir}/../optim_to_hdoc"
/>
<property
name=
"hdoc_to_opale"
location=
"${basedir}/../hdoc_to_opale"
/>
<property
name=
"optim_to_hdoc_in"
location=
"${optim_to_hdoc}/input"
/>
<property
name=
"hdoc_to_opale_in"
location=
"${hdoc_to_opale}/input"
/>
<property
name=
"optim_to_hdoc_out"
location=
"${optim_to_hdoc}/output"
/>
<property
name=
"hdoc_to_opale_out"
location=
"${hdoc_to_opale}/output"
/>
<property
name=
"optim_to_hdoc_ant"
location=
"${optim_to_hdoc}/optim_to_hdoc.ant"
/>
<!-- Mandatory ressource to use if conditions -->
<taskdef
resource=
"net/sf/antcontrib/antlib.xml"
>
<classpath>
<fileset
dir=
"${lib}"
/>
</classpath>
</taskdef>
<!-- CHECK FOR WINDOWS FAMILY OS -->
<condition
property=
"is_windows"
>
<os
family=
"windows"
/>
</condition>
<condition
property=
"is_unix"
>
<os
family=
"unix"
/>
</condition>
<!-- Main target -->
<target
name=
"main"
>
<antcall
target=
"clean"
/>
<!-- Check that the input directory is not empty -->
<if>
<length
length=
"0"
when=
"greater"
>
<fileset
dir=
"${in}"
followsymlinks=
"false"
/>
</length>
<then>
<!-- input Dir Not Empty -->
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"input directory is not empty"
/>
</antcall>
<antcall
target=
"prepare_optim_to_hdoc"
/>
<antcall
target=
"run_optim_to_hdoc"
/>
<antcall
target=
"prepare_hdoc_to_opale"
/>
<antcall
target=
"run_hdoc_to_opale"
/>
<antcall
target=
"output_files"
/>
</then>
<else>
<!-- input Dir Empty -->
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"input directory is empty"
/>
</antcall>
</else>
</if>
</target>
<!-- optim_to_hdoc -->
<!-- Moves files in optim_to_hdoc hierarchy -->
<target
name=
"prepare_optim_to_hdoc"
>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Copying input files into optim_to_hdoc input directory"
/>
</antcall>
<copy
todir=
"${optim_to_hdoc_in}"
>
<fileset
dir=
"${in}"
>
<include
name=
"*.scar"
/>
</fileset>
</copy>
</target>
<!-- Simply run optim_to_hdoc script -->
<target
name=
"run_optim_to_hdoc"
>
<antcall
target=
"run_optim_to_hdoc_unix"
/>
<antcall
target=
"run_optim_to_hdoc_windows"
/>
</target>
<!-- Run optim_to_hdoc bat -->
<target
name=
"run_optim_to_hdoc_windows"
if=
"${is_windows}"
>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Running optim_to_hdoc bat script"
/>
</antcall>
<exec
executable=
"cmd"
dir=
"${optim_to_hdoc}"
>
<arg
value=
"/c"
/>
<arg
value=
"${optim_to_hdoc}/run.bat"
/>
</exec>
</target>
<!-- Run optim_to_hdoc sh -->
<target
name=
"run_optim_to_hdoc_unix"
if=
"${is_unix}"
>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Running optim_to_hdoc shell script"
/>
</antcall>
<exec
executable=
"/bin/bash"
dir=
"${optim_to_hdoc}"
>
<arg
value=
"${optim_to_hdoc}/run.sh"
/>
</exec>
</target>
<!-- hdoc_to_opale -->
<!-- Moves files in hdoc_to_opale hierarchy -->
<target
name=
"prepare_hdoc_to_opale"
>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Copying optim_to_hdoc output files into hdoc_to_opale input directory"
/>
</antcall>
<copy
todir=
"${hdoc_to_opale_in}"
>
<fileset
dir=
"${optim_to_hdoc_out}"
>
<include
name=
"*.hdoc"
/>
</fileset>
</copy>
</target>
<!-- Simply run hdoc_to_opale script -->
<target
name=
"run_hdoc_to_opale"
>
<antcall
target=
"run_hdoc_to_opale_unix"
/>
<antcall
target=
"run_hdoc_to_opale_windows"
/>
</target>
<!-- Run hdoc_to_opale bat -->
<target
name=
"run_hdoc_to_opale_windows"
if=
"${is_windows}"
>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Running hdoc_to_opale bat script"
/>
</antcall>
<exec
executable=
"cmd"
dir=
"${hdoc_to_opale}"
>
<arg
value=
"/c"
/>
<arg
value=
"${hdoc_to_opale}/run.bat"
/>
</exec>
</target>
<!-- Run hdoc_to_opale sh -->
<target
name=
"run_hdoc_to_opale_unix"
if=
"${is_unix}"
>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Running hdoc_to_opale shell script"
/>
</antcall>
<exec
executable=
"/bin/bash"
dir=
"${hdoc_to_opale}"
>
<arg
value=
"${hdoc_to_opale}/run.sh"
/>
</exec>
</target>
<!-- Move files to the outut directory -->
<target
name=
"output_files"
>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Copying hdoc_to_opale output files into optim_to_opale output directory"
/>
</antcall>
<copy
todir=
"${out}"
>
<fileset
dir=
"${hdoc_to_opale_out}"
/>
</copy>
</target>
<!-- Some basic functions -->
<!-- Print a line both on screen and in log/execution.log file -->
<target
name=
"add_log"
>
<tstamp>
<format
property=
"now"
pattern=
"HH:mm:ss:sss"
locale=
"fr,FR"
/>
</tstamp>
<echo
message=
"[${now}] ${msg}
"
file=
"${log}/execution.log"
append=
"true"
/>
<echo
message=
"${msg}"
/>
</target>
<!-- Cleaning directories -->
<target
name=
"clean"
>
<delete
dir=
"${log}"
failonerror=
"false"
/>
<mkdir
dir=
"${log}"
/>
<antcall
target=
"add_log"
>
<param
name=
"msg"
value=
"Cleaning directories"
/>
</antcall>
<delete
dir=
"${tmp}"
failonerror=
"false"
/>
<mkdir
dir=
"${tmp}"
/>
<delete
dir=
"${out}"
failonerror=
"false"
/>
<mkdir
dir=
"${out}"
/>
</target>
</project>
\ No newline at end of file
optim_to_opale/run.bat
View file @
19a271cc
@echo
off
set
lib
=
lib
set
ant
=
myantc
e
.ant
set
ant
=
optim_to_opal
e
.ant
set
antparam
=
-Dprogram
.param
=
%
1
set
scJarList
=
%lib%
\
*
...
...
optim_to_opale/run.sh
View file @
19a271cc
#!/bin/sh
lib
=
"lib"
ant
=
"
myantc
e.ant"
ant
=
"
optim_to_opal
e.ant"
antparam
=
"-Dprogram.param=
$1
"
#Recherche de java et controle que se soit une version SUN
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment