Mail Archives: cygwin/2004/10/05/03:20:19
On 3 Oct, Igor Pechtchanski wrote:
> > Having mount.exe and cygwin1.dll in a specific dir and then run "mount -m"
> > after "set PATH=." should be the way to go.
>
> Yes, that was the idea.
> Igor
Well, I was running this script from a version of Cygwin installed on
the network. In other words, I want to avoid writing DOS batch scripts
(since they really are such a sad waste of time).
Bill Hughes's post of jscript + Windows scripting host looked
interesting, but I didn't see a clear advantage to using that than to
using Cygwin from the network: especially since the scripting host is
only available on newer Windows OS versions - so it's not portable.
And thanks to those who seemed to say that using mount is a good way to
test.
I was interested to see that seeing mount points only of the form
/$CYGDRIVE_MNT/$DRIVE_LETTER/path-to-somewhere is a good indicator that
Cygwin is not installed. Where CYGDRIVE_MNT can be determined this
way:
# Set CYGDRIVE_MNT to the mount point to be inserted in front of absolute
# path names used to refer to drive mappings. By default the mount point
# is /cygdrive, but if the user has set it to be / then $CYGDRIVE_MNT will
# be empty. Basically, the user can choose /mnt or anything they like.
#
CYGDRIVE_MNT=`mount -p | sed -n '2s| .*||;s|^/$||;2p'`
Overall though, all that seems more complicated than just using "cygpath
-w /", ("cygpath /" surely must use the mount info?), so I trust this
is equivalent - and simpler for a script!
As I mentioned, when I performed the experiment on a PC with Cygwin not
installed, the output from "cygpath -w /" consisted of just a single
backslash, which is an easy thing to check.
luke
--
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/
- Raw text -