This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problem with home directory name with spaces

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: []On Behalf
> Of Motivus
> Sent: Thursday, July 04, 2002 12:06 PM
> To:
> 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
> --
> Unsubscribe info:
> Bug reporting:
> Documentation:
> FAQ:         

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]