delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
References: | <008001c7e90c$f75b3ea0$2201a8c0 AT deborah> |
Subject: | RE: Howto force winXP use cygwin "if test -n" |
Date: | Tue, 28 Aug 2007 11:21:46 +0100 |
Message-ID: | <000101c7e95d$3e588f10$2e08a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Office Outlook 11 |
In-Reply-To: | <008001c7e90c$f75b3ea0$2201a8c0@deborah> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 28 August 2007 01:47, Hugo Martin (Tourbillon Enterprises) wrote: > Hello. > > I need to use cygwin's "if" command, the ruby gem I need to install tries to > run "if test -n" in my winXP but the win32 "if" is used so it fails with "-n > was unexpected at this time". > > Is it possible to force WinXP to use cygwin's "if"? c:\cygwin\bin is on the > PATH There is no such thing as "Cygwin's if". The 'if' command is a bash shell builtin. It does not exist as a separate executable. It can only be invoked from within bash. > If it's helpful here is the error: > > c:\> gem install rmagick --include-dependencies > ....[snip]....................................... > ... > config.status: creating ext/RMagick/rmagick_config.h > > This installation of RMagick 1.15.9 is configured for > and ImageMagick 6.3.0.patchlevel 0) [i386-mswin32] > RMagick configuration completed successfully. > > nmake > > Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 > Copyright (C) Microsoft Corp 1988-1998. All rights reserved. > > if test -n "c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.15.9/lib"; then > RUBYLIBDIR=--rbdir="c:/ruby/lib/ruby/gems/ > 1.8/gems/rmagick-1.15.9/lib"; fi; if test -n > "c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.15.9/lib"; then RUBYARCHDIR=-- > sodir="c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.15.9/lib"; fi; > /cygdrive/c/ruby/bin/ruby setup.rb config $RUBYLIBDIR $ > RUBYARCHDIR > -n was unexpected at this time. > NMAKE : fatal error U1077: 'if' : return code '0x1' > Stop. > > Gem files will remain installed in > c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.15.9 for inspection. > Results logged to c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.15.9/gem_make.out Ah, right, I think that's error code EYOUARENUTS.... how on earth do you think you can run a bash-specific shell script in cmd.exe? The syntax is totally different. Not being able to get at "cygwin's if" command is the least of your worries. > In the CygWin console: > $ if test -n >> > > In winXP cmd console: > C:\ruby\lib\ruby\gems\1.8\gems>if test -n > -n was unexpected at this time. Yeh, see, cmd.exe also has a built-in "if" command, and it uses an utterly different syntax. Whatever it is you think you're doing, you are doing it wrong! Perhaps you should elaborate on the real underlying problem, rather than just showing us a symptom and asking for a cure based on your own unstated false diagnosis. 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |