delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/05/11:18:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
From: "Bernard A Badger" <bab AT vx DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Problem with home directory name with spaces
Date: Fri, 5 Jul 2002 11:20:58 -0400
Message-ID: <INEKLKBFCDBPKMKAJLMDCEGFCFAA.bab@vx.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
In-Reply-To: <20020704160555.59431.qmail@web40210.mail.yahoo.com>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal

This is an error in the GNU utility that you were using.
(You don't say which one it is.)
Unfortunately, it is a common error to assume that file paths 
will not have spaces in them.  Shell scripts should be written to
a higher degree of defensive programming than you can get away with
when you "know" the path doesn't have unusual characters in it.

The easy answer is to change the name so as to not trigger 
"gotchas" due to lax shell programming.  

To make things better for all, get the script fixed:
First,  export PREFIX="`pwd`/install"
Then find where $PREFIX occurs and make sure it's "$PREFIX", etc.
Check other occurences of $ and `` to see if they're "safe".
Let the author know what was wrong.

1) Detect a fault.
2) Trace fault to error.
3) Fix error.
4) Fix all similar errors.
5) Try to figure out why error occurred in the first place.
6) Change methods to prevent future errors.

> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf
> Of Motivus
> Sent: Thursday, July 04, 2002 12:06 PM
> To: cygwin AT cygwin DOT com
> Subject: Problem with home directory name with spaces
> 
> 
> Hi. My default installation of Cygwin 1.3.11-3 created
> my home directory on my W2K machine as
> 
> /home/FirstName MI LastName/
> 
> Subsequently, a GNU utility I am invoking to build
> binutils is choking when I provide the installation
> directory as an argment:
> 
> $ export PREFIX=`pwd`/install
> ...
> $ ../binutils-2.11.2/configure --target=$TARGET
> --prefix=$PREFIX
> 
> The error I get:
> 
> "Can only configure for one host and one target at a
> time."
> 
> When I issue the command:
> 
> $ ../binutils-2.11.2/configure --target=$TARGET
> --prefix="/home/First M Last/install"
> 
> I get the following response:
> 
> "Configuring for a i686-pc-cygwin host.
> [: M: unknown operand"
> 
> where M is my middle initial.
> 
> Is it ok to go ahead and rename my Cygwin home
> directory to something more UNIX? Can someone refresh
> my memory on how I do this when the dir already has
> contents?
> 
> Motivus
> 
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.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/

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

- Raw text -


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