| delorie.com/archives/browse.cgi | search |
| 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 |
| Message-ID: | <000c01c314e9$6d901340$c99ac250@leper> |
| Reply-To: | <fergus AT bonhard DOT uklinux DOT net> |
| From: | <fergus AT bonhard DOT uklinux DOT net> |
| To: | <cygwin AT cygwin DOT com> |
| Cc: | <fergus AT bonhard DOT uklinux DOT net> |
| Subject: | Re: Portable Cygwin on a CD |
| Date: | Wed, 7 May 2003 23:38:49 +0100 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-MIMEOLE: | Produced By Microsoft MimeOLE V6.00.2800.1165 |
Earlier I said I was a bit nervy about automating too much of this. But I
think the following bat-file "cygmin.bat" works well to record any existing
mount points on the host machine, start up a portable process, and then
recover the host mount points after the portable process is closed.
%1\bin\mount -m | %1\bin\sed s/mount/"%1\\/bin\\/mount"/ > %2
%1\bin\umount -A
%1\bin\mount -bfu %1/ /
%1\bin\rxvt -e /bin/bash --login -i
%1\bin\umount -A
%1\bin\bash %2
The whole thing can be driven by [say]
Start -> Run -> cygmin e: c:\tmp\mount.log
or
Start -> Run -> cygmin g: a:\mnt.sh
or whatever: %1 is the host CD driveletter and %2 is the name and location
of the temporary file where you save the host mount points for later
recovery.
Fergus
PS. I guess it would be neater to name it cygmin.sh and run it as [something
like]
Start -> Run -> e:\bin\bash cygmin.sh e: c:/tmp/mount.log
but I don't quite know how %1 %2 works in a shell script; probably some \
would need to be / and v-v.
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |