List Info

Thread: Ant script for selectively bundling folders | Need Help




Ant script for selectively bundling folders | Need Help
user name
2007-09-25 02:17:16
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
user name
2007-09-25 08:27:36
On 9/25/07, Utpal Sen <shinjan.sengmail.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-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )