delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/12/03/08:37:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4CF8F2A3.8020308@alcatel-lucent.com>
Date: Fri, 3 Dec 2010 14:37:39 +0100
From: Danilo Turina <danilo DOT turina AT alcatel-lucent DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6
MIME-Version: 1.0
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: Setting CHERE_INVOKING=1 does not work because of case mismatch
References: <AANLkTimujP40m-LUQGZUs_pbGv0C24U3OcGt4HteVBkG AT mail DOT gmail DOT com> <AANLkTin+tvW=ZEWggiwENxiKuN1tw6_ir+8mmmbYSXx3 AT mail DOT gmail DOT com> <AANLkTimvuwu9wFJxDXihjMfbdDw3wRyoq0oz3KqyPAJF AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTimvuwu9wFJxDXihjMfbdDw3wRyoq0oz3KqyPAJF@mail.gmail.com>
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

On 03/12/2010 7.08, Lennart Borgman wrote:
> On Fri, Dec 3, 2010 at 6:51 AM, Andy Koppe<andy DOT koppe AT gmail DOT com>  wrote:
>> On 2 December 2010 22:31, Lennart Borgman wrote:
>>> In current cygwin (just updated) I need to downcase the test for
>>> CHERE_INVOKING in .profile to make it work
>>
>> To make what work?
>>
>> /bin/xhere, the part of the chere package that cd's to the required
>> directory and invokes the user's shell, sets CHERE_INVOKING in
>> uppercase, as it always has done.
>
> I am using this to start Cygwin from a cmd prompt:
>
>    @echo off
>    @rem Had to change chere_invoking in .profile to lower case.
>    set CHERE_INVOKING=1
>    C:\cygwin\bin\bash --login -i
>
> Is there a better way to do it?
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

I guess you should check whether, prior to launch your .BAT file, the 
CHERE_INVOKING variable is already defined in the environment in lowercase.

I mean that if I do:

     SET chere_invoking=0

and then later with the same environment (or inherited one):

     SET CHERE_INVOKING=1

I have "chere_invoking=1" in my environment (in lower case).

     C:\>set chere_invoking=0

     C:\>set CHERE_INVOKING=1

     C:\>set | grep -i chere
     chere_invoking=1

So before you launch your .BAT file do a:

     set | grep -i chere

and see whether CHERE_INVOKING is already defined in lower case in your 
environment.

Ciao,
     Danilo

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

- Raw text -


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