diff options
-rwxr-xr-x | p11-kit/test-server.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/p11-kit/test-server.sh b/p11-kit/test-server.sh index e9455dc..e1d27ac 100755 --- a/p11-kit/test-server.sh +++ b/p11-kit/test-server.sh @@ -1,7 +1,12 @@ #!/bin/sh -testdir=$PWD/test-server-$$ -test -d "$testdir" || mkdir "$testdir" +set -e + +testdir=`mktemp -d -t test-server.XXXXXX` +if test $? -ne 0; then + echo "cannot create temporary directory" >&2 + exit 77 +fi cleanup () { rm -rf "$testdir" |