summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-02-21 11:28:46 +0000
committerJim Meyering <jim@meyering.net>1998-02-21 11:28:46 +0000
commitccaf565665c6f5012649e214297d2b7c35cecbb1 (patch)
treea227e9832c9e56939d636cd697b88dbf448277b6
parentb1a82ad6f2416090d88b58e751d19819f4161074 (diff)
downloadcoreutils-ccaf565665c6f5012649e214297d2b7c35cecbb1.tar.xz
*** empty log message ***
-rwxr-xr-xtests/mv/setup22
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/mv/setup b/tests/mv/setup
index 907e5176e..94a3c67f9 100755
--- a/tests/mv/setup
+++ b/tests/mv/setup
@@ -7,21 +7,15 @@
: ${DF=df}
: ${MKDIR=mkdir}
-# Try these:
-candidate_tmp_dirs="
- $TMPDIR
- /tmp
- /var/tmp
- /usr/tmp
- $HOME
-"
+# Try these
+: ${CANDIDATE_TMP_DIRS="$TMPDIR /tmp /var/tmp /usr/tmp $HOME"}
other_partition_tmpdir=
# WARNING: using sed like this to extract the mount point will fail
# if the mount point name contains `% '.
dot_mount_point=`$DF --no-sync -P . | sed -n '2s/.*% *//p'`
-for d in $candidate_tmp_dirs; do
+for d in $CANDIDATE_TMP_DIRS; do
d_mount_point=`$DF --no-sync -P $d | sed -n '2s/.*% *//p'`
# Same partition? Skip it.
@@ -34,3 +28,13 @@ for d in $candidate_tmp_dirs; do
fi
done
+
+if test -z $other_partition_tmpdir; then
+ cat <<EOF 1>&2
+This test requires a writable directory on a different disk partition,
+and I couldn\'t find one. I tried these defaults:
+ $CANDIDATE_TMP_DIRS
+Set your environment variable CANDIDATE_TMP_DIRS to make this test use
+use a different list.
+EOF
+fi