From: Simon Ruderich Date: Wed, 9 Feb 2011 14:28:47 +0000 (+0100) Subject: shell/env: Prefer ~/.tmp to ~/tmp as TMPDIR. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=d1777f8edd13a781c96010fc86b52a96f2080994;p=config%2Fdotfiles.git shell/env: Prefer ~/.tmp to ~/tmp as TMPDIR. --- 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