Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Directories with spaces in their names

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
lduperval
Apprentice
Apprentice
Posts: 189
Joined: Sat Jun 14, 2003 11:42 pm

Directories with spaces in their names

  • Quote

Post by lduperval » Mon Apr 04, 2005 11:38 pm

Hi,

I'm trying to get the ebuild for SmClone (which is now Super Maryo Chronicles...) to cmpile. I need to cd to a directory containing spaces: "SMC 0.95 Preview 1". How do I specify this name in my ebuild? I tried a few things but I always get a

Code: Select all

 /mnt/share/gentoo/tmp/portage/smclone-0.95/work/SMC\: No such file or directory
error. I tried putting the name in quotes, I tried using backslashes but it don't woik. What haven't I tried yet?

L
Top
cartpullerjack
Apprentice
Apprentice
Posts: 185
Joined: Sun Nov 16, 2003 5:19 am

  • Quote

Post by cartpullerjack » Tue Apr 05, 2005 12:55 am

Single quotes might work. I'm not speaking from experience, just out of my ass.
Top
mc_barron
Apprentice
Apprentice
User avatar
Posts: 230
Joined: Thu Aug 28, 2003 8:51 pm
Location: Chicago, IL
Contact:
Contact mc_barron
Website

  • Quote

Post by mc_barron » Tue Apr 05, 2005 1:28 am

Sounds like you've tried what I would have tried. Just to be sure: you have tried putting double quotes around the entire path and it doesn't work? (i.e. cd "/path/with spaces")
Single quotes is a good idea too.
Sorry I can't help...but I'm interested in hearing the solution!
Top
Xaid
Guru
Guru
Posts: 474
Joined: Sat Oct 30, 2004 4:24 pm
Location: Edmonton / Alberta

  • Quote

Post by Xaid » Tue Apr 05, 2005 1:39 am

how about escaping the space with a \ ? like

Code: Select all

cd /mnt/media/some\ super\ long\ name/
edit: suppose the directory name was "some super long name"
Top
omnicloud
Guru
Guru
Posts: 550
Joined: Thu Mar 10, 2005 12:06 am
Location: California

  • Quote

Post by omnicloud » Tue Apr 05, 2005 1:43 am

If you tab complete it, it automatically escapes the space with a \ so that would be the best bet.
Top
Given M. Sur
l33t
l33t
User avatar
Posts: 648
Joined: Tue Feb 03, 2004 4:09 am
Location: No such file or directory

  • Quote

Post by Given M. Sur » Tue Apr 05, 2005 1:53 am

Just a tip, you can also use \ for characters that have a special meaning to bash, such as " ' * ? ( ) [ ] { } ~, etc.

So if you have a file named foo?.bar~what{a}stu pid.[name]

You could delete it with

Code: Select all

rm foo\?.bar\~what\{a\}stu\ pid.\[name\]
Top
lduperval
Apprentice
Apprentice
Posts: 189
Joined: Sat Jun 14, 2003 11:42 pm

  • Quote

Post by lduperval » Tue Apr 05, 2005 2:34 am

Thanks for the tips. I took a look at the ebuild again and the problem is setting the working directory like this:

Code: Select all

S="${WORKDIR}/SMC\ ${PV}\ Preview\ 1/src/unix"
Instead, I put the full directory names using single quotes in the src_unpack() and it's now going to the correct directory to patch. Not the most elegant way of doing it but if it works...

My patch is currently failing so I'm not getting any further and I won't have time to fiddle with it before a couple of days. However, I suspect that it will fail when it's time to build, so I'll probably rename the directory to somethiing more sane (like SMC-0.95) and make it work. Of course, I'll have to patch some other files, but...

Thanks,

L
Top
Post Reply

7 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic