From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7131 invoked by alias); 12 Jun 2011 17:56:50 -0000 Received: (qmail 7122 invoked by uid 22791); 12 Jun 2011 17:56:49 -0000 X-SWARE-Spam-Status: Yes, hits=5.1 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_YG,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from fmmailgate01.web.de (HELO fmmailgate01.web.de) (217.72.192.221) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jun 2011 17:56:26 +0000 Received: from smtp06.web.de ( [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id 7FDA319174FCD for ; Sun, 12 Jun 2011 19:55:57 +0200 (CEST) Received: from [217.235.58.215] (helo=[192.168.0.100]) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1QVotB-0007Tv-00 for cygwin@cygwin.com; Sun, 12 Jun 2011 19:55:57 +0200 Message-ID: <4DF4FDAC.8010809@web.de> Date: Sun, 12 Jun 2011 17:56:00 -0000 From: Roland Bluethgen User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: TMP and TEMP get redefined, but I need the original values Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Sender: calocybe@web.de X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-06/txt/msg00111.txt.bz2 Hey folks! 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 TMP="/tmp" TEMP="/tmp" http://cygwin.com/ml/cygwin/2011-03/msg00211.html 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 distribution side. (If it would not, I wouldn't have had the problem in the first place.) So, any ideas how this could be solved in a clean way? -- 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