"test" is better at testing for directories than "ls"

From-SVN: r38499
This commit is contained in:
Bruce Korb 2000-12-27 15:46:42 +00:00 committed by Bruce Korb
parent 47986760dd
commit 46159c151d
2 changed files with 6 additions and 5 deletions

View File

@ -3,6 +3,7 @@
* fixinc/Makefile.in: fix for ancient Bourne shell * fixinc/Makefile.in: fix for ancient Bourne shell
* fixinc/Makefile.BEOS: obsolete * fixinc/Makefile.BEOS: obsolete
* fixinc/Makefile.DOS: obsolete * fixinc/Makefile.DOS: obsolete
* fixinc/fixincl.sh(LINKS): use `test -d' rather than `ls' for testing
2000-12-27 Bernd Schmidt <bernds@redhat.com> 2000-12-27 Bernd Schmidt <bernds@redhat.com>

View File

@ -449,9 +449,9 @@ if $LINKS; then
all_dirs=`find . -type l -print` all_dirs=`find . -type l -print`
for file in $all_dirs for file in $all_dirs
do do
if ls -lLd $file > /dev/null if test ! -d $file
then : then
else rm -f $file rm -f $file
test $VERBOSE -gt 3 && echo " removed $file" test $VERBOSE -gt 3 && echo " removed $file"
rmdir `dirname $file` > /dev/null && \ rmdir `dirname $file` > /dev/null && \
test $VERBOSE -gt 3 && \ test $VERBOSE -gt 3 && \