delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/09/15:26:43

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: <4D52F872.6040904@bopp.net>
Date: Wed, 09 Feb 2011 14:26:26 -0600
From: Jeremy Bopp <jeremy AT bopp DOT net>
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: <AANLkTi=xp284SRr2os-oySBv4JQ7dm6NpgUEnqAfkcAH AT mail DOT gmail DOT com> <4D52E83B DOT 2020908 AT bopp DOT net> <AANLkTinsYmH18HM9yRnhNZhzCmCNKinszMaHU9GiYBK5 AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTinsYmH18HM9yRnhNZhzCmCNKinszMaHU9GiYBK5@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 02:22 PM, Jochen Wiedmann wrote:
> On Wed, Feb 9, 2011 at 8:17 PM, Jeremy Bopp <jeremy AT bopp DOT net> wrote:
> 
>> 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.
> 
> Thanks for the idea. However, I'd prefer a solution that works with
> the native cmd-Shell too. Otherwise, I'd assume that CygWin is
> installed.

Since you want a solution that works in either environment, in what
language are you going to implement your script?  You can do something
very similar in Perl and other such languages, but I can't think of a
single method that would work in both bash and cmd without at least some
syntax tweaks.

-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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019