Portable Cygwin on a CD

Hannu E K Nevalainen (garbage mail) garbage_collector@telia.com
Mon May 5 16:53:00 GMT 2003


> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of fergus@bonhard.uklinux.net


> at some point after starting up. I've tried any number of ways of 
> automating
> this to take place early in /etc/profile or ~/.bash_profile (mount -f
> "$HOMEDRIVE" "/" or whatever, but HOMEDRIVE isn't known until it's mounted
> ...). The requirement for this line is basically that Cygwin needs to be
> told the drive letter of the CD drive. (Or, if Cygwin doesn't, 
> then system()
> calls from within the application certainly do.)

C:\Program\Cygwin\bin>cd | cut -c-3
C:\
C:\Program\Cygwin\bin> \
 cd | bash -c 'export CDROOT=`cut -c-3`;rxvt -e /bin/bash --login -i'
...
$ set | grep CD    
CDROOT='C:\'

HTH ;-)

/Hannu E K Nevalainen, Mariefred, Sweden
 


More information about the Cygwin mailing list