diff options
author | Travis A. Everett <travis.a.everett@gmail.com> | 2022-08-19 15:03:37 -0500 |
---|---|---|
committer | Travis A. Everett <travis.a.everett@gmail.com> | 2022-08-19 15:16:34 -0500 |
commit | 0bf52b73f4cb61bc12c95a015a7be45f7174ca01 (patch) | |
tree | add0d4382e52e1dd05a9a7cb7b8c9d66b49a8151 /scripts | |
parent | 823e1017d809219e7e00b24ef4ccb0a8b568449c (diff) |
install: only create TMPDIR if missing
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/install-multi-user.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh index 1431857d5..01dbf0c0e 100644 --- a/scripts/install-multi-user.sh +++ b/scripts/install-multi-user.sh @@ -348,10 +348,9 @@ _sudo() { fi } - # Ensure that $TMPDIR exists if defined. -if [[ -v TMPDIR ]]; then - mkdir -m 0700 -p "$TMPDIR" +if [[ -n "${TMPDIR:-}" ]] && [[ ! -d "${TMPDIR:-}" ]]; then + mkdir -m 0700 -p "${TMPDIR:-}" fi readonly SCRATCH=$(mktemp -d) |