From cfeffb48eb936fcdbca2fcdfdeeb57fd66c9666c Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Wed, 13 Apr 2022 15:46:53 +0100 Subject: [PATCH] Support pruning compressed modules too --- rpi-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpi-update b/rpi-update index 552fbe7..1d82db4 100755 --- a/rpi-update +++ b/rpi-update @@ -133,7 +133,7 @@ function update_modules { if [[ ${PRUNE_MODULES} -ne 0 ]]; then find "${FW_MODPATH}" -mindepth 1 -maxdepth 1 -type d | while read DIR; do - COUNT=$(find "${DIR}" -type f ! \( -name '*.ko' -o -name 'modules.*' \) | wc -l); + COUNT=$(find "${DIR}" -type f ! \( -name '*.ko' -o -name '*.ko.xz' -o -name 'modules.*' \) | wc -l); if [[ ${COUNT} -eq 0 ]]; then echo "Pruning ${DIR}" rm -rf "${DIR}"