I have a comma-delimited list of directories:
foo,bar,baz,qux
I want to convert it to an Ant path containing (something like) the following:
${basedir}/build/foo/classes
${basedir}/build/bar/classes
${basedir}/build/baz/classes
${basedir}/build/qux/classes
It seems like there should be a way to do this with <pathconvert>
, but it's not obvious to me what it would be. Suggestions?
You might be able to use a
dirset
to hold your list of directories, then feed that into pathconvert. Something like:Then the property
${dirs_prop}
will hold the path you want... or almost. The problem withdirset
is that the order of directories is not defined. To retain the order of the original list, use afilelist
in place of thedirlist
: