ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Burton <bi...@progress.com>
Subject Re: Tar and exec problem
Date Thu, 08 May 2003 03:59:25 GMT
Hello,

Below ...

Praveen Shenoy wrote:
> I am using the exec task to run tar as we cannot use tar directly. 
> Running tar directly, replaces all the file permissions. So, this is how 
> I am using it
> 
> <target name="all" depends="copy_files">
>          <exec dir="${build.root}/deploy" executable="tar" 
> failonerror="true" >
>              <arg line="-cvf ../sometar.tar *" />
>          </exec>
>          <delete dir="${build.root}/deploy" />
>      </target>
> 
> It fails with
> 
> [exec] /bin/tar: *: Cannot stat: No such file or directory
> [exec] /bin/tar: Error exit delayed from previous errors
> 
> It doesn't like th "*" after the tar name. If I change it to a specific 
> directory instead of "*" it works fine. Is there a problem using "*"?

As Conor mentioned, * is expanded by the shell.  So use . instead to 
refer to the current directory.

-Bill


Mime
View raw message