buildconf: avoid using tempfile when removing files

Closes #5213
This commit is contained in:
Alexander V. Tikhonov 2019-11-08 15:08:04 +03:00 committed by Daniel Stenberg
parent 4cd239fbf6
commit 1e41bec96a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 10 deletions

View File

@ -64,16 +64,7 @@ findtool(){
#
removethis(){
if test "$#" = "1"; then
find . -depth -name $1 -print > buildconf.tmp.$$
while read fdname
do
if test -f "$fdname"; then
rm -f "$fdname"
elif test -d "$fdname"; then
rm -f -r "$fdname"
fi
done < buildconf.tmp.$$
rm -f buildconf.tmp.$$
find . -depth -name $1 -print -exec rm -rf {} \;
fi
}