diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-08-17 21:47:01 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-08-17 21:47:01 +0200 |
commit | 823e1017d809219e7e00b24ef4ccb0a8b568449c (patch) | |
tree | d416ed8bb662b73b01b5751915979f549369de5c /scripts/install-multi-user.sh | |
parent | 6547dcde2a37179f98cc9a8702bc15a2fd1e6a4b (diff) |
Ensure that $TMPDIR exists if defined
Diffstat (limited to 'scripts/install-multi-user.sh')
-rw-r--r-- | scripts/install-multi-user.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh index 7c8e159b5..1431857d5 100644 --- a/scripts/install-multi-user.sh +++ b/scripts/install-multi-user.sh @@ -349,6 +349,11 @@ _sudo() { } +# Ensure that $TMPDIR exists if defined. +if [[ -v TMPDIR ]]; then + mkdir -m 0700 -p "$TMPDIR" +fi + readonly SCRATCH=$(mktemp -d) finish_cleanup() { rm -rf "$SCRATCH" |