diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-08-22 12:07:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 12:07:38 +0200 |
commit | 380bf60c2ef2e364b8ea5c02e9687a601595302b (patch) | |
tree | add0d4382e52e1dd05a9a7cb7b8c9d66b49a8151 /scripts | |
parent | 823e1017d809219e7e00b24ef4ccb0a8b568449c (diff) | |
parent | 0bf52b73f4cb61bc12c95a015a7be45f7174ca01 (diff) |
Merge pull request #2 from abathur/tmp-slash
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) |