From: Vlado <v.99cygwin@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin mount option -s is not supported
Date: Wed, 25 Nov 2020 19:26:05 +0100 [thread overview]
Message-ID: <8f5d2511-c8a5-8a9e-3acc-d09da078fae1@gmail.com> (raw)
In-Reply-To: <4697a70efd18481fa378325d2136322c@BELBRU-EXMP101.eeas.europa.eu>
On 25.11.2020 15:18, KAVALAGIOS Panagiotis (EEAS-EXT) wrote:
> ---------
> 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>/
> 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"`
Hi.
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
Vlado
next prev parent reply other threads:[~2020-11-25 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 14:18 KAVALAGIOS Panagiotis (EEAS-EXT)
2020-11-25 18:26 ` Vlado [this message]
2020-11-25 20:58 ` Brian Inglis
2020-11-26 11:12 ` KAVALAGIOS Panagiotis (EEAS-EXT)
2020-11-27 23:15 ` Brian Inglis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8f5d2511-c8a5-8a9e-3acc-d09da078fae1@gmail.com \
--to=v.99cygwin@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).