www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/11/25/15:59:42

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3F0533851C1A
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca
X-Authority-Analysis: v=2.4 cv=NYRYa0P4 c=1 sm=1 tr=0 ts=5fbec58e
a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17
a=IkcTkHD0fZMA:10 a=CCpqsmhAAAAA:8 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10
a=ul9cdbp4aOFLsgKbc677:22
To: cygwin AT cygwin DOT com
References: <4697a70efd18481fa378325d2136322c AT BELBRU-EXMP101 DOT eeas DOT europa DOT eu>
<8f5d2511-c8a5-8a9e-3acc-d09da078fae1 AT gmail DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
Subject: Re: Cygwin mount option -s is not supported
Message-ID: <ac41a9ca-5f9a-b173-0de6-baf95b02fee0@SystematicSw.ab.ca>
Date: Wed, 25 Nov 2020 13:58:53 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.5.0
MIME-Version: 1.0
In-Reply-To: <8f5d2511-c8a5-8a9e-3acc-d09da078fae1@gmail.com>
X-CMAE-Envelope: MS4xfG4RP5Q7U/K/65Iiwa8mWTI6dyoDseRUIFxGoyb/as0hkd3DkWWdDPiYdjjKOvBWv8/xnP/SEYj+xbLji7rGx5lK0pu5ufYyIVTAnqjW4VYvAqI1t+3l
v/AREIF2j2FnLrV+koLi0vWxaa+f9ziELnbGpNHnK3TrEpEMVQM6PXB7bBDbPL/7PHWdrCcxr0GfzkWHgTygl9ha/JIkJrppkXA=
X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW,
SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 0APKxOMQ023701

On 2020-11-25 11:26, Vlado via Cygwin wrote:
> On 25.11.2020 15:18, KAVALAGIOS Panagiotis (EEAS-EXT) wrote:

Mount -s was removed in 2008:
https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=5f853b3fc5277da8cb5ba3ac7406447fe82e65de
three months after it was set to be ignored.

>>    if [ -n "`uname -s |grep -i cygwin_`" ]; then
>>    # If we are on an new version of Cygnus we need to turn <letter>:/ in
>>    # the path to/cygdrive/<letter>/

Use of 'Cygnus' refers to 20+ years ago when Cygwin was a product.

>>      CYGDRIVE=`mount -p | tail -1 | awk '{print $1}' | sed -e 's%/$%%'`
>>      WL_HOME_CYGWIN=`echo $WL_HOME | sed "s#\([a-zA-Z]\):#${CYGDRIVE}/\1#g"`
>>      ANT_HOME_CYGWIN=`echo $ANT_HOME | sed "s#\([a-zA-Z]\):#${CYGDRIVE}/\1#g"`
>>      PATCH_PATH_CYGWIN=`echo $PATCH_PATH | sed 
>> "s#\([a-zA-Z]\):#${CYGDRIVE}/\1#g"`
>>      JAVA_HOME_CYGWIN=`echo $JAVA_HOME | sed "s#\([a-zA-Z]\):#${CYGDRIVE}/\1#g"`
>>      JRE_HOME_CYGWIN=`echo $JRE_HOME | sed "s#\([a-zA-Z]\):#${CYGDRIVE}/\1#g"`

> Hard to say why Oracle's script is written this way. Standard Cygwin tool for 
> file names conversion is cygpath. Instead of using sed, one can write
> WL_HOME_CYGWIN=`cygpath -u $WL_HOME`
> - simpler and the result will be more consistent. Example
> 
> $ WL_HOME='C:\some\dir\subdir'            # Windows path
> $ echo "$WL_HOME" | sed "s#\([a-zA-Z]\):#/cygdrive/c/\1#g"
> /cygdrive/c/C\some\dir\subdir             # mixed forward and back slashes
> $ cygpath -u "$WL_HOME"
> /cygdrive/c/some/dir/subdir               # pretty Cygwin path

Especially note the cygpath -U -> /proc/cygdrive/, -a -> /..., and -p path 
conversion options should be used as appropriate: try all three!

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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