mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-26 04:30:27 +01:00
Improve "make check" test for -b condition when /dev cannot be searched.
This commit is contained in:
parent
537a237f2b
commit
ff98487aa5
2 changed files with 12 additions and 3 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2001-05-25 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 14484: Test/C02cond.ztst: Print a warning and skip the -b test
|
||||||
|
if no block devices can be found (test only ! -b in that case).
|
||||||
|
|
||||||
2001-05-25 Clint Adams <schizo@debian.org>
|
2001-05-25 Clint Adams <schizo@debian.org>
|
||||||
|
|
||||||
* 14479: Completion/Debian/Command/_apt: add --reinstall.
|
* 14479: Completion/Debian/Command/_apt: add --reinstall.
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,13 @@
|
||||||
0:-a cond
|
0:-a cond
|
||||||
|
|
||||||
# Find a block special file system. This is a little tricky.
|
# Find a block special file system. This is a little tricky.
|
||||||
block=$(find /dev /devices -type b -print 2>/dev/null|head -1) &&
|
if block=$(find /dev(|ices)/ -type b -print); then
|
||||||
[[ -b $block && ! -b zerolength ]]
|
[[ -b $block[(f)1] && ! -b zerolength ]]
|
||||||
0:-b cond
|
else
|
||||||
|
print -u8 'Warning: Not testing [[ -b blockdevice ]] (no devices found)'
|
||||||
|
[[ ! -b zerolength ]]
|
||||||
|
fi
|
||||||
|
0D:-b cond
|
||||||
|
|
||||||
char=(/dev/tty*([1]))
|
char=(/dev/tty*([1]))
|
||||||
[[ -c $char && ! -c $block ]]
|
[[ -c $char && ! -c $block ]]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue