X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_SV X-Spam-Check-By: sourceware.org Message-ID: <4D52E83B.2020908@bopp.net> Date: Wed, 09 Feb 2011 13:17:15 -0600 From: Jeremy Bopp User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: How to detect CygWin SVN? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 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