ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexis Votta" <alexisvo...@gmail.com>
Subject Re: SCP task to preserve exact time stamp
Date Thu, 25 Oct 2007 18:28:01 GMT
That's because bash excepts a shell script as it's arguments.

Your <exec> translates to "bash scp -p -r ..." and scp is not a
script, it is a binary file. So it fails.

To execute any binary with bash, you need to give the -c argument.

bash -c scp -p -r ...

So you can adjust your <exec> task accordingly.

On 10/24/07, venkata prasad <prasadeceonline@gmail.com> wrote:
> Hi,
>
> With your syntax, it is giving the below error.
>
> /*   <exec executable="bash">
>           <arg line="scp -p -r /ccdata/oracle  /apps/oracle"/>
>      </exec>
> */
>
> /usr/bin/scp:  can't execute binary file.
>
> i am using bash shell.
>
>
> On 10/24/07, Rebhan, Gilbert <Gilbert.Rebhan@huk-coburg.de> wrote:
> >
> >
> > Hi,
> >
> > -----Original Message-----
> > From: venkata prasad [mailto:prasadeceonline@gmail.com]
> > Sent: Wednesday, October 24, 2007 3:15 PM
> > To: Ant Users List
> > Subject: Re: SCP task to preserve exact time stamp
> >
> > /*
> > But i am missing time stamp for some of the files and folders.
> >
> > Is it possible to know what are the files added/modified since last
> > copy?
> > */
> >
> > that's not the point you've asked for - "... preserving timestamps ..."
> >
> > for scp with preserving timestamps the solution which is working
> > perfectly for me is =
> >
> > <exec executable="ksh" failonerror="true">
> > <arg value="scp -p -r
> > ...
> >
> > maybe the syntax of your exec =
> >
> > <exec dir="." executable="scp">
> > <arg line="-p -r /ccdata/oracle  /apps/oracle"/>
> > </exec>
> >
> > is wrong ?!
> >
> > try with =
> >
> > <exec executable="ksh">
> > <arg line="scp -p -r /ccdata/oracle  /apps/oracle"/>
> > </exec>
> >
> > change ksh to your standard shell
> >
> >
> > Regards, Gilbert
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>

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


Mime
View raw message