aboutsummaryrefslogtreecommitdiffstats
path: root/mandriva/tmpdir.csh
blob: a2cc08dab97eac808c526681c442b8b7ab7177ff (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/sysconfig/shell) then
    eval `cat /etc/sysconfig/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