aboutsummaryrefslogtreecommitdiff
path: root/test.bash
diff options
context:
space:
mode:
Diffstat (limited to 'test.bash')
-rwxr-xr-xtest.bash8
1 files changed, 7 insertions, 1 deletions
diff --git a/test.bash b/test.bash
index d306b7e..628feff 100755
--- a/test.bash
+++ b/test.bash
@@ -1,10 +1,16 @@
#!/bin/bash
+if [[ -z $TMPDIR ]]; then
+ TMPDIR=/tmp
+else
+ echo "Using TMPDIR=$TMPDIR"
+fi
+
set -eu
cd "$(dirname "$0")"
MYNAME=$(basename "$0")
-TESTDIR=/tmp/gocryptfs-test-parent
+TESTDIR=$TMPDIR/gocryptfs-test-parent
mkdir -p $TESTDIR
LOCKFILE=$TESTDIR/$MYNAME.lock