]> code.delx.au - dotfiles/commitdiff
Bash: Only process TMPDIR if it is set
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 1 Jul 2008 11:05:27 +0000 (21:05 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Tue, 1 Jul 2008 11:05:27 +0000 (21:05 +1000)
.bash/environment

index ddbae4ad0df10b86050fe80060ddcc712ee4f7f2..b868f91f7252a5b9d9b0b776b63083a92ebde95d 100644 (file)
@@ -17,7 +17,7 @@ export HISTCONTROL="ignoredups"
 export HISTSIZE="10000"
 
 # Expand any symbolic links in the TMPDIR environment variable
-export TMPDIR="$(cd "${TMPDIR}" && pwd -P)"
+[ -n "$TMPDIR" ] && export TMPDIR="$(cd "${TMPDIR}" && pwd -P)"
 
 # Load the bash functions
 source "${HOME}/.bash/functions"