You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Christian Peter <ch...@charlysworld.de> on 2000/10/15 00:12:35 UTC

Problems with zip/tgz and shell scripts

Hi all,

sorry if this point was already mentioned. I couldn't find
an archive of this mailing-list.

My problem is:

I've got a shellscript for an application and I want to deliver it 
in a tar-gz (and an zip) along with the application files.

My problem is that the ant-tar-gz (and zip) task doesn't preserve the 
rights to execute a shellscript. I tried the 1.2 Release Candidate and
it didn't work either.

Maybe I'm wrong (I dunno).

Thanks in advance for your response,
ant is pretty cool,
charly

-- 
10 HOME
20 SWEET
30 GOTO 10

Re: Problems with zip/tgz and shell scripts

Posted by Christopher Elkins <ce...@scardini.com>.
> Hi all,
>
> sorry if this point was already mentioned. I couldn't find
> an archive of this mailing-list.
>
> My problem is:
>
> I've got a shellscript for an application and I want to deliver it
> in a tar-gz (and an zip) along with the application files.
>
> My problem is that the ant-tar-gz (and zip) task doesn't preserve the
> rights to execute a shellscript. I tried the 1.2 Release Candidate and
> it didn't work either.
>
> Maybe I'm wrong (I dunno).
>
No, you're quite right. The tar task doesn't preserve permissions, because
java.io.File doesn't propogate that information from the underlying file system.
Unfortunately, you'll have to tar your packages the old-fashioned way.

> Thanks in advance for your response,
> ant is pretty cool,
> charly
>

--
Christopher Elkins


RE: Problems with zip/tgz and shell scripts

Posted by Marcel Schutte <ma...@schutte.com>.
> sorry if this point was already mentioned. I couldn't find
> an archive of this mailing-list.

It's at http://archive.covalent.net

>
> My problem is:
>
> I've got a shellscript for an application and I want to deliver it
> in a tar-gz (and an zip) along with the application files.
>
> My problem is that the ant-tar-gz (and zip) task doesn't preserve the
> rights to execute a shellscript. I tried the 1.2 Release Candidate and
> it didn't work either.

That's right, but it is documented behaviour. Java can't reach file
permissions, that's why.
If you could use ant to do the unpacking, you can use the <chmod> task
afterwards. Otherwise you could try to use <exec> to call the native tar
command.

Marcel