You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mindspin311 <co...@gmail.com> on 2008/03/30 19:47:15 UTC

Can I zip a folder on server A, and send it to Server B

This is all being done in Unix for tarring a directory of php files.

The process I'm trying to do is: 

given a folder you're either in or are sending as a command line argument, 

1. tar it
2. use svn update to get the version number to append to the file name.
3. send it to a different server. 

I also have to execute some commands like sudo and possibly exec. 

Can I do this all in ant without having to create a temp tar file, then ftp
it to another server, then go back and delete the temp tar file? 

Can I use move instead of copy across different servers, so I don't have to
remove the temp file after? 

I'm new to ant, so any help would be greatly appreciated. Just trying to get
an idea if this can be done as simply as possible.
-- 
View this message in context: http://www.nabble.com/Can-I-zip-a-folder-on-server-A%2C-and-send-it-to-Server-B-tp16384813p16384813.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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


RE: Can I zip a folder on server A, and send it to Server B

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
Look at the scp task. It will take a fileset. But what you describe,
with the temp tar (or tar.gz, I would suggest), can be more efficient if
you have a lot of data to transfer. 

Also, a question like this is better suited for the user list. The dev
list really has to do with the development of Ant and Ant tasks.

-Rob A

-----Original Message-----
From: mindspin311 [mailto:connoc.mindspin@gmail.com] 
Sent: Sunday, March 30, 2008 10:47 AM
To: dev@ant.apache.org
Subject: Can I zip a folder on server A, and send it to Server B


This is all being done in Unix for tarring a directory of php files.

The process I'm trying to do is: 

given a folder you're either in or are sending as a command line
argument, 

1. tar it
2. use svn update to get the version number to append to the file name.
3. send it to a different server. 

I also have to execute some commands like sudo and possibly exec. 

Can I do this all in ant without having to create a temp tar file, then
ftp
it to another server, then go back and delete the temp tar file? 

Can I use move instead of copy across different servers, so I don't have
to
remove the temp file after? 

I'm new to ant, so any help would be greatly appreciated. Just trying to
get
an idea if this can be done as simply as possible.
-- 
View this message in context:
http://www.nabble.com/Can-I-zip-a-folder-on-server-A%2C-and-send-it-to-S
erver-B-tp16384813p16384813.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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


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


AW: Can I zip a folder on server A, and send it to Server B

Posted by Ja...@rzf.fin-nrw.de.
1. Get the version info: <exec executable="svn"><arg value="update"/> with embedded <redirector>
   (is 'svn update' the right command? not 'svn info'?) 
2. Create the tar file: <tar tarfile="${dirname}-${version}.tar"><fileset dir="${dirname}"/>
3. Transfer to the remote server: <scp>
4. Specify the directory from command line: ant -Ddirname=foo/bar

Jan

> -----Ursprüngliche Nachricht-----
> Von: mindspin311 [mailto:connoc.mindspin@gmail.com] 
> Gesendet: Sonntag, 30. März 2008 19:47
> An: dev@ant.apache.org
> Betreff: Can I zip a folder on server A, and send it to Server B
> 
> 
> This is all being done in Unix for tarring a directory of php files.
> 
> The process I'm trying to do is: 
> 
> given a folder you're either in or are sending as a command 
> line argument, 
> 
> 1. tar it
> 2. use svn update to get the version number to append to the 
> file name.
> 3. send it to a different server. 
> 
> I also have to execute some commands like sudo and possibly exec. 
> 
> Can I do this all in ant without having to create a temp tar 
> file, then ftp
> it to another server, then go back and delete the temp tar file? 
> 
> Can I use move instead of copy across different servers, so I 
> don't have to
> remove the temp file after? 
> 
> I'm new to ant, so any help would be greatly appreciated. 
> Just trying to get
> an idea if this can be done as simply as possible.
> -- 
> View this message in context: 
> http://www.nabble.com/Can-I-zip-a-folder-on-server-A%2C-and-se
nd-it-to-Server-B-tp16384813p16384813.html
> Sent from the Ant - Dev mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 

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