delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
Date: | Fri, 1 Oct 2004 14:51:01 +1000 (EST) |
From: | luke DOT kendall AT cisra DOT canon DOT com DOT au |
Subject: | A good way to test if Cygwin isn't installed? |
To: | cygwin AT cygwin DOT com |
MIME-Version: | 1.0 |
Message-Id: | <20041001045101.8AA6484C99@pessard.research.canon.com.au> |
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. I'm working my way towards a shell script that installs or upgrades Cygwin on a machine that may or may not have Cygwin installed, and do all our local post-install stuff (which is a lot of stuff), and also test that at least the major packages from the install work properly. luke -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |