From f3721ab2dce137e67579959d8992a251d35dcdb7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 6 Dec 2008 06:05:54 +0000 Subject: * posix/globtest.sh: Use mktemp to create temporary file and directory. --- posix/globtest.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'posix') 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 -- cgit 1.4.1