about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-12-06 06:05:54 +0000
committerUlrich Drepper <drepper@redhat.com>2008-12-06 06:05:54 +0000
commitf3721ab2dce137e67579959d8992a251d35dcdb7 (patch)
tree34e9828ca4104af4300036c691ca938ce2508e9a /posix
parent25a34eb737fa25391f8c6d2915fff80b218a1524 (diff)
downloadglibc-f3721ab2dce137e67579959d8992a251d35dcdb7.tar.gz
glibc-f3721ab2dce137e67579959d8992a251d35dcdb7.tar.xz
glibc-f3721ab2dce137e67579959d8992a251d35dcdb7.zip
* posix/globtest.sh: Use mktemp to create temporary file and
	directory.
Diffstat (limited to 'posix')
-rwxr-xr-xposix/globtest.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/posix/globtest.sh b/posix/globtest.sh
index ad47508a66..aadac87796 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 
 common_objpfx=$1; shift
 elf_objpfx=$1; shift
@@ -28,14 +28,11 @@ export LANG
 
 # Create the arena
 : ${TMPDIR=/tmp}
-testdir=$TMPDIR/globtest-dir
-testout=$TMPDIR/globtest-out
+testdir=$(mktemp -d $TMPDIR/globtest-dir.XXXXXX)
+testout=$(mktemp $TMPDIR/globtest-out.XXXXXX)
 
 trap 'chmod 777 $testdir/noread; rm -fr $testdir $testout' 1 2 3 15
 
-test -d $testdir/noread && chmod 777 $testdir/noread
-rm -fr $testdir 2>/dev/null
-mkdir $testdir
 echo 1 > $testdir/file1
 echo 2 > $testdir/file2
 echo 3 > $testdir/-file3