diff --git a/shell/_main.sh b/shell/_main.sh index 3503fbb..92f4dad 100755 --- a/shell/_main.sh +++ b/shell/_main.sh @@ -49,3 +49,4 @@ source "$DOTSHELL/kubernetes.sh" # Environment Setup source "$DOTSHELL/env.sh" +source "$DOTSHELL/tmpdir.sh" diff --git a/shell/env.sh b/shell/env.sh index f75da8e..7258139 100644 --- a/shell/env.sh +++ b/shell/env.sh @@ -33,9 +33,3 @@ path_prepend "$HOME/bin" # Add dotfiles' bin directory to PATH path_prepend "$DOTBIN" - -# Ensure TMPDIR is the same for local and remote ssh logins -if [[ $TMPDIR == "/var/folders/"* ]] || [[ $TMPDIR == "" ]]; then - export TMPDIR="/tmp/user-$USER" - mkdir -p "$TMPDIR" -fi diff --git a/shell/tmpdir.sh b/shell/tmpdir.sh new file mode 100644 index 0000000..a309496 --- /dev/null +++ b/shell/tmpdir.sh @@ -0,0 +1,9 @@ +# +# TMPDIR setup +# + +# Ensure TMPDIR is the same for local and remote ssh logins +if [[ $TMPDIR == "/var/folders/"* ]] || [[ $TMPDIR == "" ]]; then + export TMPDIR="/tmp/user-$USER" + mkdir -p "$TMPDIR" +fi