Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
From: "Dave Korn" <dk@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: "cd" in bash script not being executed
Date: Thu, 8 Jul 2004 18:32:46 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
In-Reply-To: <002401c4650c$3bdf2830$b200a8c0@mindcooler>
Message-ID: <NUTMEGs84htn04ThNZ300000780@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 08 Jul 2004 17:32:46.0515 (UTC) FILETIME=[95320830:01C46511]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i68HY6P4015851

> -----Original Message-----
> From: cygwin-owner On Behalf Of Mikael Åsberg
> Sent: 08 July 2004 17:54

> #!/bin/bash
> export CVS_RSH="ssh"
> cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/emacs co emacs
> cd emacs/nt/
> configure.bat --with-msvc
> mv ../lisp/url/vc-dav.el ../lisp/url/no.vc-dav.el.no
> nmake bootstrap
> nmake install
> 
> The cd emacs/nt/ command isn't executed so the commands 
> following it fails.

  Wrong.  The cd is executed.  But since you haven't got . in your $PATH,
the configure.bat doesn't run.  You want to prefix the line that invokes it
with the current-directory-path, like so:

> ./configure.bat --with-msvc

  To solve problems like this yourself, you'd generally want to try
instrumenting your script with some diagnostic printouts, like this:

> cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/emacs co emacs
> pwd ; ls
> cd emacs/nt/ ; pwd ; ls
> pwd ; ls
> pwd ; configure.bat --with-msvc
> mv ../lisp/url/vc-dav.el ../lisp/url/no.vc-dav.el.no

...which would have shown you at once that the cd instruction did indeed
work.


    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/


