]> git.g-eek.se Git - interimap.git/commitdiff
tests/run: Honor $TMPDIR if the variable is set.
authorGuilhem Moulin <guilhem@fripost.org>
Mon, 27 May 2019 22:18:26 +0000 (00:18 +0200)
committerGuilhem Moulin <guilhem@fripost.org>
Mon, 27 May 2019 22:23:57 +0000 (00:23 +0200)
Otherwise use /dev/shm.

tests/run

index 31af03e5e9ccb7c5e70e2d88da273c949c1cc670..d823f0af93da9fdb3d507b2b732361aa0aa5d624 100755 (executable)
--- a/tests/run
+++ b/tests/run
@@ -36,7 +36,7 @@ if [ ! -d "$TESTDIR" ]; then
     exit 1
 fi
 
-ROOTDIR="$(mktemp --tmpdir=/dev/shm --directory "$NAME.XXXXXXXXXX")"
+ROOTDIR="$(mktemp --tmpdir="${TMPDIR:-/dev/shm}" --directory "$NAME.XXXXXXXXXX")"
 trap 'rm -rf -- "$ROOTDIR"' EXIT INT TERM
 
 STDOUT="$ROOTDIR/stdout"