Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-VirusChecked: Checked X-Env-Sender: Bill DOT Hughes AT cox DOT co DOT uk X-Msg-Ref: server-3.tower-14.messagelabs.com!1096624452!20210577 X-StarScan-Version: 5.2.10; banners=cox.co.uk,-,- X-Originating-IP: [62.172.235.173] Message-ID: From: "Hughes, Bill" To: cygwin AT cygwin DOT com Subject: RE: A good way to test if Cygwin isn't installed? Date: Fri, 1 Oct 2004 10:52:43 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-IsSubscribed: yes luke DOT kendall AT cisra DOT canon DOT com DOT au wrote: > 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. What if you don't have cygwin in your path until it's started? Wouldn't it be better to check to see if the cygwin hive is present in the registry, and if necessary verify the mount data from there? Bill -- ___ oo // \\ "De Chelonian Mobile" (_,\/ \_/ \ TortoiseSVN \ \_/_\_/> The coolest Interface to (Sub)Version Control /_/ \_\ http://tortoisesvn.tigris.org This e-mail transmission is strictly confidential and intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this email in error, please reply to the sender as soon as possible and delete the message. Please note that we are able to, and reserve the right to, monitor e-mail communications passing through our network. The views expressed in this email are not that of the company unless specified within the message. The inclusion of this footnote indicates that the mail message and any attachments have been checked for the presence of known viruses. If you have any comments regarding our policy please direct them to postmaster AT cox DOT co DOT uk ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ -- 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/