delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
X-IronPortListener: | Outbound_SMTP |
X-IronPort-Anti-Spam-Filtered: | true |
X-IronPort-Anti-Spam-Result: | Av0EAARve0+cKEcW/2dsb2JhbABFuBWBB4IQEihRAQgNJwIvEyYBBBsah2eaJIQ+m1yQA2MEjSmJS4UBih6DAw |
From: | "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder AT niaid DOT nih DOT gov> |
To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
Date: | Tue, 3 Apr 2012 17:47:40 -0400 |
Subject: | RE: Is this supposed to work this way? |
Message-ID: | <0105D5C1E0353146B1B222348B0411A20A6536CB91@NIHMLBX02.nih.gov> |
MIME-Version: | 1.0 |
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 |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id q33Lm03f007191 |
Andrey Repin sent the following at Tuesday, April 03, 2012 3:21 PM >[Z:\]$ assoc .sh >.sh=unixshell.script > >[Z:\]$ ftype unixshell.script >unixshell.script="C:/Programs/Cygwin/bin/env.exe" "%1" %* > >[Z:\]$ testcase.sh >++ readlink -fn 'Z:\testcase.sh' >+ XXX='/z/Z:\testcase.sh' >+ echo '/z/Z:\testcase.sh' >/z/Z:\testcase.sh >++ dirname '/z/Z:\testcase.sh' >+ XXX=/z/Z: >+ echo /z/Z: >/z/Z: >+ ls -l /z/Z: >ls: cannot access /z/Z:: No such file or directory > >The "testcase.sh" is very simple. > >#! /bin/sh >set -x >XXX=${XXX:=$(readlink -fn "$0")} >echo $XXX >XXX=$(dirname "$XXX") >echo $XXX >ls -l "$XXX" > >I can combat this by >XXX=$(cygpath -alm "$0") >XXX=${XXX:=$(readlink -fn "$0")} > >but then my script losing portability. (Namely, I can't "set -e" it then.) >Any suggestions, perhaps? Is there a reason that something like the following wouldn't work? if [ -f /bin/cygwin1.dll ] then else fi >Sorry for my terrible english... Not at all terrible. Best wishes, - Barry Disclaimer: Statements made herein are not made on behalf of NIAID. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |