From d1777f8edd13a781c96010fc86b52a96f2080994 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 9 Feb 2011 15:28:47 +0100 Subject: [PATCH] shell/env: Prefer ~/.tmp to ~/tmp as TMPDIR. --- shell/env | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/shell/env b/shell/env index d478b17..c1a950e 100644 --- a/shell/env +++ b/shell/env @@ -28,9 +28,15 @@ export EDITOR PAGER=less export PAGER -# Use ~/tmp as directory for temporary files if available to reduce security +# Use ~/.tmp as directory for temporary files if available to reduce security # problems on multi-user systems. -if [ -O ~/tmp -a -d ~/tmp ]; then +if [ -O ~/.tmp -a -d ~/.tmp ]; then + TMP=~/.tmp + TEMP=$TMP + TMPDIR=$TMP + export TMP TEMP TMPDIR +# Also try ~/tmp as fallback. +elif [ -O ~/tmp -a -d ~/tmp ]; then TMP=~/tmp TEMP=$TMP TMPDIR=$TMP -- 2.45.2