delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Message-ID: | <18584.12950.943391.75971@gepard2.akutech-local.de> |
Date: | Tue, 5 Aug 2008 12:59:34 +0200 |
From: | Ralf Fassel <ralfixx AT gmx DOT de> |
To: | cygwin AT cygwin DOT com |
Subject: | environment variables derived from TMPDIR |
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 |
In a SHELL script I prepare a temp file to pass to some non-cygwin program: # TMPDIR is set to c:/temp outside of cygwin # which translates to /cygdrive/c/temp inside cygwin # prepare input TMPFILE=$TMPDIR/foo.$$ cat > "$TMPFILE" <<\EOF some stuff EOF # call program: error: no such file /cygdrive/c/temp/foo.1234 # filename should be c:/temp/foo.1234 external_program "$TMPFILE" Now TMPFILE is passed to the external program using POSIX path notation which it does not understand. If possible I'd like to avoid using 'cygpath' in the script since it should run on different platforms. Is there any way to switch off the auto-conversion of TMPDIR? Since Cygwin thankfully understands windows-style pathnames, I don't see the big advantage of translating this variable to posix and back... (BTW, TMPDIR is not yet mentioned in the manuals for auto-converted variables like PATH and HOME). Alternatively, would it be a good idea to mark variables derived from auto-converted variables to become auto-converted on export, too? Something like the 'tainted' variables in perl? R' -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |