diff options
author | Bruce Korb <bkorb@gnu.org> | 2000-12-27 15:46:42 +0000 |
---|---|---|
committer | Bruce Korb <korbb@gcc.gnu.org> | 2000-12-27 15:46:42 +0000 |
commit | 46159c151de000016ce85c0f2e8c200f96e71ea0 (patch) | |
tree | 247b709b125aaca45af345709ef65cd26159e99b /gcc | |
parent | 47986760dd977164fb821e3d6a722899e0ea783f (diff) | |
download | gcc-46159c151de000016ce85c0f2e8c200f96e71ea0.zip gcc-46159c151de000016ce85c0f2e8c200f96e71ea0.tar.gz gcc-46159c151de000016ce85c0f2e8c200f96e71ea0.tar.bz2 |
"test" is better at testing for directories than "ls"
From-SVN: r38499
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 1 | ||||
-rwxr-xr-x | gcc/fixinc/fixincl.sh | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f1c1e1..ae90957 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,7 @@ * fixinc/Makefile.in: fix for ancient Bourne shell * fixinc/Makefile.BEOS: 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> diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc/fixincl.sh index 9a44cb8..18b5fb2 100755 --- a/gcc/fixinc/fixincl.sh +++ b/gcc/fixinc/fixincl.sh @@ -449,11 +449,11 @@ if $LINKS; then all_dirs=`find . -type l -print` for file in $all_dirs do - if ls -lLd $file > /dev/null - then : - else rm -f $file - test $VERBOSE -gt 3 && echo " removed $file" - rmdir `dirname $file` > /dev/null && \ + if test ! -d $file + then + rm -f $file + test $VERBOSE -gt 3 && echo " removed $file" + rmdir `dirname $file` > /dev/null && \ test $VERBOSE -gt 3 && \ echo " removed `dirname $file`" fi |