summaryrefslogtreecommitdiff
path: root/src/abslibre-tools/librerelease
diff options
context:
space:
mode:
Diffstat (limited to 'src/abslibre-tools/librerelease')
-rwxr-xr-xsrc/abslibre-tools/librerelease11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index 2da919f..de3cc24 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -106,7 +106,7 @@ sign_packages() {
}
# Clean everything if not in dry-run mode
-clean_files() {
+clean_files() (
local file_list=$1
local rmcmd=(rm -fv)
@@ -115,10 +115,11 @@ clean_files() {
fi
msg "Removing files from local staging directory"
- cd "${WORKDIR}/staging" && xargs -0r -a "$file_list" "${rmcmd[@]}"
- cd "${WORKDIR}/staging" && find . -mindepth 1 -type d -empty \
- -exec rmdir -p {} + 2>/dev/null
-}
+ cd "${WORKDIR}/staging"
+ xargs -0r -a "$file_list" "${rmcmd[@]}"
+ find . -depth -mindepth 1 -type d \
+ -exec rmdir --ignore-fail-on-non-empty -- '{}' +
+)
################################################################################