Use whoami instead of $USER

If TMPDIR doesn't exist, USER also may not exist. `mkdir` then throws an
error after this because TMPDIR is /tmp/, which already exists.
This commit is contained in:
Alpha Chen 2014-05-07 16:27:32 -07:00
parent bf9dbfd5b9
commit f463d1fdfa

View file

@ -66,7 +66,7 @@ fi
#
if [[ ! -d "$TMPDIR" ]]; then
export TMPDIR="/tmp/$USER"
export TMPDIR="/tmp/`whoami`"
mkdir -p -m 700 "$TMPDIR"
fi