From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13255 invoked by alias); 9 Feb 2011 19:17:26 -0000 Received: (qmail 13239 invoked by uid 22791); 9 Feb 2011 19:17:26 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_SV X-Spam-Check-By: sourceware.org Received: from mail31.mailforbusiness.com (HELO mail31.mailforbusiness.com) (64.106.209.53) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Feb 2011 19:17:21 +0000 Received: from mail31.mailforbusiness.com (localhost.simplicato.com [127.0.0.1]) by mail31.mailforbusiness.com (Postfix) with ESMTP id 018AB72AF17 for ; Wed, 9 Feb 2011 14:17:18 -0500 (EST) Received: from [192.168.168.81] (67-198-47-98.static.grandenetworks.net [67.198.47.98]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jeremy@bopp.net) by mail31.mailforbusiness.com (Postfix) with ESMTPSA id 75A6E72B016 for ; Wed, 9 Feb 2011 14:17:18 -0500 (EST) Message-ID: <4D52E83B.2020908@bopp.net> Date: Wed, 09 Feb 2011 19:17:00 -0000 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@cygwin.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@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-02/txt/msg00256.txt.bz2 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