----- Original Message -----
From: "Forrester, Tom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, April 30, 2002 02:21
Subject: Tar file won't extract properly within Telnet task
>
> On windows I am using the <tar> and <gzip> tasks to archive my Web site.
> I then use the <ftp> task to transfer the website.tar.gz file to a remote
> Unix server.
> I then use the <telnet> task to logon on to the Unix server and after
change
> to root etc. I unzip the file using gunzip website.tar.gz (within
<telnet>),
> the I use tar xvf ${remote_stage_dir}/website.tar (still within the
<telnet>
> task).
>
> The problem is that the result or the tar xvf command unpacks all the
files
> within the subfolders of the archive, but not the top level files.
> If go to the Unix server directly and use the same tar command on the same
> file it unpacks all the files correctly, so the ant script is capturing
all
> the files in the <tar> task.
> I can only surmise that the <telnet> task in ant is having some effect on
> the tar xvf ${remote_stage_dir}/website.tar command. BTW,
> ${remote_stage_dir}/ expands properly.
unlikely
> <!-- Deploy the web site on the remote server-->
> <telnet server="${remote_server_domain_map}">
> <read>login:</read>
> <write string="${remote_userid}" />
> <read>Password:</read>
> <write string="${remote_password}" />
> <read string="${remote_user_home}"/>
> <write>su</write>
> <read>Password:</read>
> <write>holiday</write>
we didnt need to know that :) ...<telnet>'s own login stuff should work
> <read>#</read>
> <write>csh</write>
> <read string="${remote_user_home}"/>
> <write string="cd ${remote_stage_dir}" />
> <read string="${remote_stage_dir}"/>
> <write string="gunzip website.tar.gz" />
> <read string="${remote_stage_dir}"/>
> <!--<write string="chmod 666 ${virtual_server_path}" />
> <read string="${remote_stage_dir}"/>
> <write string="cd ${virtual_server_path}" />
> <read string="${virtual_server_path}"/>-->
> <write string="tar xvf ${remote_stage_dir}/website.tar" />
> </telnet>
you need to wait for the tar to finish; add another read for the prompt
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>