delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/18/13:46:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_HELO_PASS,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Making Unix like paths work when using java program from Cygwin
Date: Fri, 18 May 2012 10:46:05 -0700
Lines: 19
Message-ID: <jp61t0$las$1@dough.gmane.org>
References: <CA+sc5mm2eUv45ABD4KFQvLo=Cxcw868w4u1E7eDsoK7bNFb83Q AT mail DOT gmail DOT com> <1337353913 DOT 48698 DOT YahooMailClassic AT web28605 DOT mail DOT ukl DOT yahoo DOT com>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
In-Reply-To: <1337353913.48698.YahooMailClassic@web28605.mail.ukl.yahoo.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 5/18/2012 8:11 AM, Marilo wrote:
> The java aspect looks like a red herring as not relevant to the problem.
>
> You want to run a *nix shell script and presumably don't want to write your own bat file doing the same job.
>
> I'm probably missing something but given that there's cygwin, and it's a *nux script, what about just editing the script for your computer, amending the paths in the script, with  a find and replace, so /ABC/XYZ is replaced with /cygdrive/c/ABC/XYZ and running the script in cygwin.
That's a bad thing to do! Now you have deviated and have a unique 
version of this script. It will not work 6 months down the road when the 
script is updated on the Unix/Linux side and you have to again port it.

Instead carefully test to make sure you're in Cygwin and when in Cygwin 
use cygpath appropriately. Then "contribute" the code back from whence 
it came so you have a hope that the next version will at least have your 
portability changes if not the modifier will simply follow suit and take 
into account Cygwin users as you've shown can be done.
-- 
Andrew DeFaria <http://defaria.com>
As the shopper placed her groceries on the checkout stand, the bagger 
asked her paper or plastic? Doesn't matter, she replied, I'm bisackual.


--
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