You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Utpal Sen <sh...@gmail.com> on 2007/09/25 09:17:16 UTC
Ant script for selectively bundling folders | Need Help
Hi
I am trying to create an ant script to selectively bundle folders if the
folders contains a particular file.
E.g.
folers are:
folder_1
folder_2
folder_3
all under folder.root
The ant script should check if the folders contains a particular file (
execute.sql) and then only create a tar containing those folders.
In the example if
folder_1 and folder_2 contains the file execute.sql then the resulting tar
should contain only this two folders and ignore the folder (folder_3) which
is not having the file.
I tried with this:
<fileset dir="${folder.root}">
<include
name="folder_**/execute.sql"/>
<and>
<present
targetdir="${folder.root}"/>
<type
type="file"/>
</and>
</fileset>
This works if any file is present in the above mentioned folders.
I wanted to extend it if it contains only execute.sql
It willbe very helpful if you can provide me some pointers.
Many Thanks
Utpal
Re: Ant script for selectively bundling folders | Need Help
Posted by Dominique Devienne <dd...@gmail.com>.
On 9/25/07, Utpal Sen <sh...@gmail.com> wrote:
> It willbe very helpful if you can provide me some pointers.
You may get more success with <dirset> and a <contains> selector (not
100% sure, but worth looking into).
Note that is more an Ant-user question. --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org