test for directory existance before calling find

This commit is contained in:
Mark Andrews
2012-10-16 10:56:06 +11:00
parent c0dcb1e04e
commit cfee4fb8a2
+1 -1
View File
@@ -35,5 +35,5 @@ status=0
for d in $SUBDIRS
do
test ! -f $d/clean.sh || ( cd $d && sh clean.sh )
find $d -type d -exec rmdir '{}' \; 2> /dev/null
test -d $d && find $d -type d -exec rmdir '{}' \; 2> /dev/null
done