Created
April 7, 2011 10:17
-
-
Save Reiot/907492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<project name="moveit" default="build" basedir="./"> | |
<taskdef resource="net/sf/antcontrib/antcontrib.properties"> | |
<classpath> | |
<pathelement location="${basedir}/Documents/Works/warcloud/build/tools/ant-contrib-1.0b3.jar"/> | |
</classpath> | |
</taskdef> | |
<target name="build"> | |
<var name="file.default" value="idle"/> | |
<foreach param="file.name" target="moveit"> | |
<path> | |
<filelist dir="./" files="aaa.png, bbb_aaa.png, bbb_bbb.png, ccc_aaa_0.png"/> | |
</path> | |
</foreach> | |
</target> | |
<target name="moveit"> | |
<echo message="file.name: ${file.name} ${file.default}"/> | |
<basename property="basename" file="${file.name}" suffix=".png"/> | |
<echo message="basename: ${basename}"/> | |
<propertyregex property="output" | |
input="${basename}" | |
regexp="(.+?)_(.+)" | |
select="\2" | |
defaultValue="${file.default}"/> | |
<propertyregex property="dirname" | |
input="${basename}" | |
regexp="(.+?)_(.+)" | |
select="\1" | |
defaultValue="${basename}"/> | |
<echo message="dirname: ${dirname}"/> | |
<echo message="output: ${output}"/> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment