Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 6 Nov 2002 11:07:14 -0500
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: cygwin Installer should setup a root environment variable
Message-ID: <20021106160714.GF10719@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <3DC8A128.90309@pobox.com> <Pine.GSO.4.44.0211060108050.24745-100000@slinky.cs.nyu.edu> <aqauqf$8e9$1@main.gmane.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aqauqf$8e9$1@main.gmane.org>
User-Agent: Mutt/1.5.1i

On Wed, Nov 06, 2002 at 12:42:21PM +0100, Sven K?hler wrote:
>>>I have experienced many times situations which I would like to refer to
>>>CYGWIN's root directory from a bat script. The most generic solution
>>>would be to utilise an environment variable such as CYGROOT or (as in
>>>startxwin.bat) CYGWIN_ROOT to refer to the absolute windows pathname
>>>(e.g. D:\cygwin). This would free us from making assumptions if it was
>>>setup during the installation utility. The environment variable should
>>>be setup for system if installed for "All Users".
>>
>>
>>`cygpath -w /`
>
>nice idea, but how does he execute cygpath, if he doesn't know the 
>cygwin-root? he is talking about a _batch_-script, not a shell script.
>
>there is only one solution, because even if you know cygwin's root-dir, 
>yu cannot be sure to know cygwin's bin-dir - it could be mounted to a 
>totally different directory.
>
>i would recomm writing shell-scripts instead of batch-scripts.

Given the above, how would that solve anything?  You wouldn't be able to
find /bin/sh either.

cygpath is the correct solution.  Putting cygwin's bin directory in your
system path is another solution.  The installer could be modified to do
this but, blah, blah, blah.

cgf
--
Please do not send me personal email with cygwin questions or observations.
Use the resources at http://cygwin.com/ .

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

