X-Spam-Check-By: sourceware.org
Date: Sun, 22 Apr 2007 19:48:34 +0200
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: cygwin@cygwin.com
Subject: Re: \r in variables and test
Message-ID: <20070422174834.GY7781@interface.famille.thibault.fr>
Mail-Followup-To: cygwin@cygwin.com
References: <20070422170609.GV7781@interface.famille.thibault.fr> <f0g6n4$511$1@sea.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <f0g6n4$511$1@sea.gmane.org>
User-Agent: Mutt/1.5.12-2006-07-14
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
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

Michael Hoffman, le Sun 22 Apr 2007 18:40:29 +0100, a écrit :
> >In a ./configure script, I call a test program (native python, actually)
> >that outputs "True\r\n" and I put this result in variable foo. The
> >problem is that [ "$foo" = True ] doesn't return true because foo
> >actually contains True\r, not True.
> 
> * use Cygwin Python

I precisely don't want to do that.

> * change the Python script to output \n instead of \r\n

I'm not maintainer of the python script.

> * [ $foo = $'True\r' ]

This then won't work for cygwin's python.

> * [ ${foo/%$'\r'/} = True ]

This looks saner, but shouldn't the test program always do this itself?

Anyhow, the place that needs to be fixed is rather
/us/share/autoconf-archive/ac_python_devel.m4

Samuel

--
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/

