ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Utpal Sen" <shinjan....@gmail.com>
Subject Ant script for selectively bundling folders | Need Help
Date Tue, 25 Sep 2007 07:17:16 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message