1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

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

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