aboutsummaryrefslogtreecommitdiffstats
path: root/.zprofile
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-09-30 14:45:54 +0200
committerDavid Runge <dave@sleepmap.de>2016-09-30 14:45:54 +0200
commit93212415c3e6a32f8db27054cab620a9d5e3ef39 (patch)
tree9caadbb39f20c8371119e766e2caa00aadae9700 /.zprofile
parent726c0e6ced877cec3f2d7317ca0fcdfaf212585f (diff)
downloaddotfiles-93212415c3e6a32f8db27054cab620a9d5e3ef39.tar.gz
dotfiles-93212415c3e6a32f8db27054cab620a9d5e3ef39.tar.bz2
dotfiles-93212415c3e6a32f8db27054cab620a9d5e3ef39.tar.xz
dotfiles-93212415c3e6a32f8db27054cab620a9d5e3ef39.zip
.zprofile: Adding tmpdir exception for root.
Diffstat (limited to '.zprofile')
-rw-r--r--.zprofile6
1 files changed, 5 insertions, 1 deletions
diff --git a/.zprofile b/.zprofile
index dd49b8f..e76fdd3 100644
--- a/.zprofile
+++ b/.zprofile
@@ -38,7 +38,11 @@ fi
#
if [[ ! -d "$TMPDIR" ]]; then
- export TMPDIR="$XDG_RUNTIME_DIR"
+ if [[ $USER == "root" ]]; then
+ export TMPDIR="/tmp/$USER"
+ else
+ export TMPDIR="$XDG_RUNTIME_DIR"
+ fi
mkdir -p -m 700 "$TMPDIR"
fi