summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 21:18:36 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 21:19:01 -0500
commit1bcc49058febc7e2723c455879da6ff3b9ca6576 (patch)
tree55d8df38046c29fec3372c5f4f2ebffac1ddf452
parent3537841a9287ea1c7871545ffebb855561f7c1e0 (diff)
Use `mktemp -t` to respect $TMPDIR
-rw-r--r--db-functions2
-rwxr-xr-xget-repos2
2 files changed, 2 insertions, 2 deletions
diff --git a/db-functions b/db-functions
index 458a370..f56ca19 100644
--- a/db-functions
+++ b/db-functions
@@ -16,7 +16,7 @@ restore_umask () {
}
# set up general environment
-WORKDIR=$(mktemp -d /tmp/$(basename $0).XXXXXXXXXX)
+WORKDIR=$(mktemp -dt "$(basename $0).XXXXXXXXXX")
LOCKS=()
# check if messages are to be printed using color
diff --git a/get-repos b/get-repos
index bfc08ff..796051c 100755
--- a/get-repos
+++ b/get-repos
@@ -20,7 +20,7 @@ trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT
trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT
trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
-TMPDIR="$(mktemp -d /tmp/$(basename $0).XXXX)"
+TMPDIR="$(mktemp -dt "$(basename $0).XXXX")"
DBLIST=()
# Repos