This is the mail archive of the
mailing list for the Cygwin project.
Re: TMP and TEMP get redefined, but I need the original values
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin at cygwin dot com
- Date: Sun, 12 Jun 2011 15:07:56 -0400
- Subject: Re: TMP and TEMP get redefined, but I need the original values
- References: <4DF4FDAC.email@example.com>
On 6/12/2011 1:55 PM, Roland Bluethgen wrote:
I don't update my Cygwin installation regularly, but recently I did, and
then a script of mine stopped working.
Looking for the cause I found out that the Cygwin maintainers chose to
redefine the TEMP and TMP environment variables in /etc/profile like this:
unset TMP TEMP
Before that change, the TMP and TEMP defined by Windows were used
unmodified (except for cygpath translation). I'm sure the maintainers
have good reasons for this change. However, now I'm unable to find out
the original TEMP setting from a script.
To help your imagination what this could be good for, the purpose of the
script in question is for aiding in Windows maintenance, specifically
for cleaning up the TEMP folder.
I helped myself by deactivating the lines cited above in /etc/profile
for now, but that is clearly not a fine solution. Well, I could store
the original values of TMP and TEMP in backup variables, like
WINDOWS_TEMP or so. That would have to go in /etc/profile before the
variables are unset. But then, this modification would probably get
overwritten the next time something is changed in that file on the
No, it wouldn't get overwritten. Your /etc/profile will only get
overwritten if it's unchanged from the default.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple