delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/14/05:24:16

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-Envelope-Sender: kamenzky AT inf DOT fu-berlin DOT de
X-Remote-IP: 160.45.115.253
Mime-Version: 1.0 (Apple Message framework v752.3)
Message-Id: <4A00B393-DD8B-403D-99BA-F90F9985AB1C@inf.fu-berlin.de>
To: cygwin AT cygwin DOT com
From: Nicolai Kamenzky <kamenzky AT inf DOT fu-berlin DOT de>
Subject: Running Cygwin bash from Ant script
Date: Wed, 14 Nov 2007 11:10:06 +0100
X-Mailer: Apple Mail (2.752.3)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019