From: Thomas Debesse Date: Sun, 7 Mar 2021 05:15:23 +0000 (+0100) Subject: library-bundler: only call rmdir on empty directories when cleaning-up useless stuff X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=03ab09a97aec61abf547fb0c90251e12afb5f048;p=xonotic%2Fnetradiant.git library-bundler: only call rmdir on empty directories when cleaning-up useless stuff --- diff --git a/library-bundler b/library-bundler index 235734ea..b08b9c89 100755 --- a/library-bundler +++ b/library-bundler @@ -333,6 +333,9 @@ Multi::bundleLibFromFile () { } Multi::cleanUp () { + # Remove from bundle things that useless to be distributed, + # like headers or static libraries, also remove + # empty directories. find "${bundle_dir}/lib" \ -type f \ -name '*.a' \ @@ -346,8 +349,8 @@ Multi::cleanUp () { find "${bundle_dir}/lib" \ -depth \ -type d \ - -exec rmdir {} \; \ - || true + -empty \ + -exec rmdir {} \; } Linux::getRpath () {