about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-05-04 06:39:46 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-05-04 06:39:46 +0000
commit7019cb655fe843136a868962ab5d8e799ee387a9 (patch)
tree27c8d7a224ffbda33a9d15969b066f285e51c440
parent02d4869c4311bc920e94f1b5ff87d02683d603fc (diff)
downloadzsh-7019cb655fe843136a868962ab5d8e799ee387a9.tar.gz
zsh-7019cb655fe843136a868962ab5d8e799ee387a9.tar.xz
zsh-7019cb655fe843136a868962ab5d8e799ee387a9.zip
11137: Test/07cond.ztst: detect block device file using find.
-rw-r--r--ChangeLog4
-rw-r--r--Test/07cond.ztst6
2 files changed, 5 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ceb421514..aeafb93a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-03  Tanaka Akira  <akr@m17n.org>
+
+	* 11137: Test/07cond.ztst: detect block device file using find.
+
 2000-05-03  Bart Schaefer  <schaefer@zsh.org>
 
 	* 11136: Doc/Zsh/expn.yo: Reorganize history expansion doc.
diff --git a/Test/07cond.ztst b/Test/07cond.ztst
index 1d1ba6679..827f2744e 100644
--- a/Test/07cond.ztst
+++ b/Test/07cond.ztst
@@ -27,11 +27,7 @@
 0:-a cond
 
   # Find a block special file system.  This is a little tricky.
-  block=$(df / | awk '
-    $NF == "/" {print $1}
-    $1 == "/" && substr($2,0,1) == "(" {
-      if((l = index($2,")") - 2) < 0) l = length($2) - 1;
-      print substr($2,2,l)}') &&
+  block=$(find /dev /devices -type b -print 2>/dev/null|head -1) &&
   [[ -b $block && ! -b zerolength ]]
 0:-b cond