bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: other-fs-tmpdir: don't misbehave for quote-unfriendly $TM


From: Jim Meyering
Subject: [PATCH] tests: other-fs-tmpdir: don't misbehave for quote-unfriendly $TMPDIR
Date: Sat, 29 Aug 2009 19:21:08 +0200

When $TMPDIR contains spaces, this helper script should
now work better:

>From 0a859a6cb0000f3662f1b06c151d80e1d764f983 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 29 Aug 2009 09:18:45 +0200
Subject: [PATCH] tests: other-fs-tmpdir: don't misbehave for quote-unfriendly 
$TMPDIR

* tests/other-fs-tmpdir: Quote uses of variables that might expand
to strings containing e.g., whitespace.
---
 tests/other-fs-tmpdir |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/other-fs-tmpdir b/tests/other-fs-tmpdir
index 4340ac5..1035978 100644
--- a/tests/other-fs-tmpdir
+++ b/tests/other-fs-tmpdir
@@ -29,12 +29,12 @@ dot_mount_point=`stat -c %d .`
 for d in $CANDIDATE_TMP_DIRS; do

   # Skip nonexistent directories.
-  test -d $d || continue
+  test -d "$d" || continue

-  d_mount_point=`stat -L -c %d $d`
+  d_mount_point=`stat -L -c %d "$d"`

   # Same partition?  Skip it.
-  test x$d_mount_point = x$dot_mount_point && continue
+  test "x$d_mount_point" = "x$dot_mount_point" && continue

   # See if we can create a directory in it.
   if mkdir "$d/tmp$$" > /dev/null 2>&1; then
--
1.6.4.1.373.g81fb2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]