Re: Running Cygwin bash from Ant script

2007-11-22 Thread Igor Peshansky
On Wed, 14 Nov 2007, Nicolai Kamenzky wrote:

 Hi folks!

 In my Ant script I have a target which should
 1. Start the Cygwin bash,
 2. Change the current directory, and
 3. Execute a command.

 I have done this previously using the windows console,
 but now I want to do the same with the Cygwin bash.

 My Ant target looked like this:
 project name=xyz basedir=.
   target name=build
   exec dir=. executable=cmd.exe
   arg line=/c make/
   /exec
   /target
 /project

 I tried this, but it didn't work:
 project name=xyz basedir=.
   target name=build
   exec dir=. executable=C:\Program Files\cygwin\bin\bash
   arg line= --login -i -c cd 
 /cygdrive/c/someFolderToBeTheCurrentDir/; make/
   /exec
   /target
 /project

 Any ideas?

This isn't really Cygwin-specific -- you'd have the same problem with ant
and bash on Linux.  Don't use arg line, use something like

exec dir=. executable=C:\Program Files\cygwin\bin\bash
arg value=--login/
arg value=-i/
arg value=-c/
arg value=cd 
/cygdrive/c/someFolderToBeTheCurrentDir/; make/
/exec

HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Belief can be manipulated.  Only knowledge is dangerous.  -- Frank Herbert

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Running Cygwin bash from Ant script

2007-11-14 Thread Nicolai Kamenzky

Hi folks!

In my Ant script I have a target which should
1. Start the Cygwin bash,
2. Change the current directory, and
3. Execute a command.

I have done this previously using the windows console,
but now I want to do the same with the Cygwin bash.

My Ant target looked like this:
project name=xyz basedir=.
target name=build
exec dir=. executable=cmd.exe
arg line=/c make/
/exec
/target
/project

I tried this, but it didn't work:
project name=xyz basedir=.
target name=build
exec dir=. executable=C:\Program Files\cygwin\bin\bash
			arg line= --login -i -c cd /cygdrive/c/ 
someFolderToBeTheCurrentDir/; make/

/exec
/target
/project

Any ideas?

Cheers,
Nicolai

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Running Cygwin bash from Ant script

2007-11-14 Thread Dave Korn
On 14 November 2007 10:10, Nicolai Kamenzky wrote:


 I tried this, but it didn't work:
 project name=xyz basedir=.
   target name=build
   exec dir=. executable=C:\Program Files\cygwin\bin\bash
   arg line= --login -i -c cd /cygdrive/c/
 someFolderToBeTheCurrentDir/; make/
   /exec
   /target
 /project
 
 Any ideas?

  Try

arg line= --login -i -c 'cd /cygdrive/c/someFolderToBeTheCurrentDir/;
make'/

  Note quotes make entire command line a single parameter to '-c'.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Running Cygwin bash from Ant script

2007-11-14 Thread Dave Korn
On 14 November 2007 15:36, Nicolai Kamenzky wrote:

 Thanks Dave, that made it!
 
 Another question:

  http://cygwin.com/acronyms/#PPIOSPE.  List Cc'd back in.

 In the line: exec dir=. executable=C:\Program Files\cygwin\bin
 \bash
 Can I use a path other than C:\... so that in case the Cygwin
 installation is elsewhere the bash executable is found, as well?

  Well, that's an AutoIt question, not a cygwin question, but I suspect the
answer you're looking for is Yes, you can put any path there, or if the
cygwin bin dir is already in the PATH setting for the machine you could just
put bash there on its own.

cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/