summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-04-29 09:18:52 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-04-29 09:18:52 +0200
commit180e655748dc6fd8c62ca7fa269e4f614ac1e8ca (patch)
treec6b0e1a02165591c45c7961398340725666f644b
parent31c1ebb69681e9b9b9d17795210f6bbd24ee2381 (diff)
downloaddbscripts-180e655748dc6fd8c62ca7fa269e4f614ac1e8ca.tar.gz
dbscripts-180e655748dc6fd8c62ca7fa269e4f614ac1e8ca.tar.xz
Respect TMPDIR config when creating the working directory
-rw-r--r--db-functions2
-rw-r--r--test/lib/common.inc2
2 files changed, 3 insertions, 1 deletions
diff --git a/db-functions b/db-functions
index 1b77035..c992fe5 100644
--- a/db-functions
+++ b/db-functions
@@ -16,7 +16,7 @@ restore_umask () {
}
# set up general environment
-WORKDIR=$(mktemp -d /tmp/${0##*/}.XXXXXXXXXX)
+WORKDIR=$(mktemp -d "${TMPDIR}/${0##*/}.XXXXXXXXXX")
LOCKS=()
# check if messages are to be printed using color
diff --git a/test/lib/common.inc b/test/lib/common.inc
index a703152..3001ad8 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -1,6 +1,8 @@
set -E
. "$(dirname ${BASH_SOURCE[0]})/../../config"
+# override the default TMPDIR
+export TMPDIR="$(mktemp -d /tmp/${0##*/}.XXXXXXXXXX)"
. "$(dirname ${BASH_SOURCE[0]})/../../db-functions"
signpkg() {