This is the mail archive of the cygwin 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: How to uniformly point to the root of a drive?


* Christopher Faylor (Sun, 20 May 2007 12:36:47 -0400)
> On Sun, May 20, 2007 at 09:23:45AM -0700, Brian Dessent wrote:
> >Dave Korn wrote:
> >>I'm not sure exactly what Thorsten is looking for in his original
> >>question, so I don't know if it's relevant here or not, but it might be
> >>useful for a portable installation to have a way to detect the drive
> >>letter so as to be able to (re)assign the mountpoints (e.g.  from
> >>Cygwin.bat) before starting up a shell or other cygwin app.  USB stick
> >>drive letters change very often...
> >
> >Yes, there is a very real need for that kind of adjustment in such a
> >situation, but you'd have to do it using native/batch scripting since
> >trying to start a bash shell with /usr pointing off into empty space
> >will probably not end well.  Since the question seemed to be looking
> >for the POSIX form of the rootdir I assumed that the mount tables had
> >already been frobbed.
> 
> Except that he mentioned /cygdrive/?  which doesn't require a root
> directory.
> 
> I assumed that he was actually looking for a way to figure out where he
> was running from so that he could set up the mount table.

The mount table is already set from a batch (4NT) script. I can refer 
to that quite easily with something like "set usb=%@left[2,%
_cmdspec]" and then using %usb.


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


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