Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: From: To: Cc: Subject: Re: Portable Cygwin on a CD Date: Wed, 7 May 2003 23:38:49 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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/