X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=shell%2Fenv;h=2047e60a8aa5379d20b50aef8928ac0fa8d982e6;hb=daed52b3c1d6cfa5bfe8246adfcffe0246a5b5c7;hp=0739edf061ca91822e9cd206ce409c35eb00bf5f;hpb=3dc5f80854c4a9a411220625158307b01ff2930a;p=config%2Fdotfiles.git diff --git a/shell/env b/shell/env index 0739edf..2047e60 100644 --- a/shell/env +++ b/shell/env @@ -1,5 +1,20 @@ # Configuration file for environment related options for all shells. +# Copyright (C) 2011-2012 Simon Ruderich +# +# This file is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . + source_debug ". ~/.shell/env" @@ -28,9 +43,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