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: A good way to test if cygwin isn't installed?


On Fri, Oct 01, 2004 at 02:51:01PM +1000, luke.kendall@cisra.canon.com.au wrote:
>I just wanted to run an idea past the list.
>
>I want to write a shell script to test if Cygwin has been installed on
>the machine running the shell script.
>
>I do this by running a shell (from a network install of Cygwin if
>necessary).
>
>If Cygwin is installed on the local machine, then "cygpath -w /"
>returns something like "c:\cygwin".  (Good for discovering what drive 
>Cygwin was installed on, right?)  If Cygwin has not been installed, 
>"cygpath -w /" returns a plain old backslash.
>
>That's fine - maybe even great.  My question: is that a reliable way to
>perform that test?  It seems good to me.

If you have cygwin programs available to you, then use the mount
command.  If the only output from the mount command is of the "noumount"
variety then cygwin isn't installed in any meaningful way.

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