ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: How to add/update files in a tar file?
Date Thu, 30 Nov 2000 08:40:42 GMT
Markus Albrecht <markus.albrecht@v-connect.com> wrote:

> Although I'd like to switch to a tar file, since it preservers
> access rights for unix systems.

The <tar> task doesn't, you will have to switch to <exec>, <execon> or
(if using development versions) <transform> and use the tar executable
for that.

This would something like

<execon executable="tar" parallel="true">
  <arg value="-u" />
  <arg value="-f" />
  <arg file="release.tar" />
  <fileset dir="${home1}">
    <patternset ... />
  </fileset>
  <fileset dir="${home2}">
    <patternset ... />
  </fileset>
</execon>

or using undocumentated and not really stable (in terms of API) stuff
that has been added after the 1.2 release:

<transform executable="tar" parallel="true" dest=".">
  <arg value="-u" />
  <arg value="-f" />
  <arg file="release.tar" />
  <fileset dir="${home1}">
    <patternset ... />
  </fileset>
  <fileset dir="${home2}">
    <patternset ... />
  </fileset>
  <mapper type="merge" to="release.tar" />
</transform>

the latter will only pass the files that are actually newer that the
archive on the command line.

> How can I add/update to an existing tar file more files?

You can't using <tar>, again, you'll need to use the command line.

Stefan

Mime
View raw message