How to detect CygWin SVN?

Jeremy Bopp jeremy@bopp.net
Wed Feb 9 19:17:00 GMT 2011


On 02/09/2011 01:10 PM, Jochen Wiedmann wrote:
> Hi,
> 
> I'd like to write a script, which ought to work with the CygWin SVN
> client as well as any native SVN clients. As a prerequisite, I need to
> detect whether the "svn" program in the path is CygWin SVN or not.
> Question is, how to do this? Because the output of "svn --version"
> contains nothing that indicates compilation with CygWin.

I'm assuming that your script expects svn to be in the PATH, so you
could check to see if the path to the svn client lives within Cygwin's
installation:

if [ $(type -p svn) = '/usr/bin/svn' ]; then
  echo "Found Cygwin's svn client"
fi

Unless someone goes out of their way to confound things, this should be
good enough.

-Jeremy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list