diff options
author | David P <megver83@parabola.nu> | 2017-07-29 21:59:30 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2017-07-29 21:59:30 -0400 |
commit | 5e9742f03e4199c006b0f9d0d8069a2fb41d9258 (patch) | |
tree | c5e7c30625b30b50a2a2385ef934c1d7e57eb2fa /src/abslibre-tools | |
parent | 63f4ac3c0a6ea7e060720b63964cf158157fc785 (diff) | |
parent | 0b8606e0cd0e1aedfe222d4d6603c4986aacb7b5 (diff) |
Diffstat (limited to 'src/abslibre-tools')
-rwxr-xr-x | src/abslibre-tools/librerelease | 11 |
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 -- '{}' + +) ################################################################################ |