diff options
author | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-27 15:46:42 +0000 |
---|---|---|
committer | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-27 15:46:42 +0000 |
commit | 5fd70b957f037f11b3517461625558e03d733c79 (patch) | |
tree | 247b709b125aaca45af345709ef65cd26159e99b /gcc/fixinc | |
parent | 7db90a00dba8bf7d83f51aa899cda16389de639d (diff) | |
download | gcc-5fd70b957f037f11b3517461625558e03d733c79.tar.gz |
"test" is better at testing for directories than "ls"
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38499 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rwxr-xr-x | gcc/fixinc/fixincl.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc/fixincl.sh index 9a44cb8cc68..18b5fb24651 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 |