Allow wildcards in PURGE_TARGETS to match any type of file except for directories.

Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
This commit is contained in:
Jeremy Huntwork 2012-05-28 16:13:35 +00:00 committed by Dan McGee
parent 3a24e44206
commit d310b6f85c
1 changed files with 1 additions and 1 deletions

View File

@ -1048,7 +1048,7 @@ tidy_install() {
local pt
for pt in "${PURGE_TARGETS[@]}"; do
if [[ ${pt} = "${pt//\/}" ]]; then
find . -type f -name "${pt}" -exec rm -f -- '{}' \;
find . ! -type d -name "${pt}" -exec rm -f -- '{}' \;
else
rm -f ${pt}
fi