aboutsummaryrefslogtreecommitdiffstats
path: root/mandriva/tmpdir.csh
blob: c0deecabe0ddd3e126427eff1c9fce3fa27526f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# $Id$
# Set TMPDIR and TMP

if (-f /etc/security/shell) then
    eval `cat /etc/security/shell | grep -v ^# | sed -re 's/^([^=]+=)/set \1/'`
endif

if ($?SECURE_TMP) then
    if ($SECURE_TMP == "yes") then
        if ( -d ${HOME}/tmp && -w ${HOME}/tmp ) then
            setenv TMPDIR ${HOME}/tmp
            setenv TMP ${HOME}/tmp
            exit
        endif

        if ( { mkdir -p ${HOME}/tmp >&! /dev/null } ) then 
            setenv TMPDIR ${HOME}/tmp
            setenv TMP ${HOME}/tmp
            exit
        endif
    endif
endif

setenv TMPDIR /tmp
setenv TMP /tmp