ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Rosenberg" ...@tabbysplace.org>
Subject RE: [Newbie] Nice way of concatenating files
Date Mon, 19 Jul 2010 15:06:52 GMT
Ant's <concat/> task is what you want:

	http://ant.apache.org/manual/index.html

--
Jonathan Rosenberg
Founder & Executive Director, Tabby's Place
http://www.tabbysplace.org/


-----Original Message-----
From: matthew@jaggard.org.uk [mailto:matthew@jaggard.org.uk] On Behalf Of
Matthew Jaggard
Sent: Monday, July 19, 2010 11:00 AM
To: user
Subject: [Newbie] Nice way of concatenating files

Hi,
   Sorry for the newbie question. I have written a task to concatenate
files but want to do it better (in a more platform independent way) as
it currently relies on "cat" being an available executable. Can anyone
tell me how to do this using the <concat> task or anything?

	<target name="-pre-compile">
		<apply executable="cat">
			<arg value="${web.docbase.dir}/header.html "/>
			<srcfile/>
			<arg value="${web.docbase.dir}/footer.html "/>
			<fileset dir="${web.docbase.dir}/"
includes="*.html.part" excludes="" />
			<mapper type="glob" from="*.html.part" to="*.html"/>
			<redirector>
				<outputmapper id="out" type="glob"
from="*.html.part"
to="${build.web.dir}/*.html"/>
			</redirector>
		</apply>
	</target>


Many thanks,
Mat.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message