]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
library-bundler: only call rmdir on empty directories when cleaning-up useless stuff
authorThomas Debesse <dev@illwieckz.net>
Sun, 7 Mar 2021 05:15:23 +0000 (06:15 +0100)
committerThomas Debesse <dev@illwieckz.net>
Sun, 7 Mar 2021 09:13:02 +0000 (10:13 +0100)
library-bundler

index 235734eac0386f94915e14f82d9b92ae0b12e3eb..b08b9c89c0e2b71cf7dbddb7c8ff89bcbbe5c0b1 100755 (executable)
@@ -333,6 +333,9 @@ Multi::bundleLibFromFile () {
 }
 
 Multi::cleanUp () {
 }
 
 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' \
        find "${bundle_dir}/lib" \
                -type f \
                -name '*.a' \
@@ -346,8 +349,8 @@ Multi::cleanUp () {
        find "${bundle_dir}/lib" \
                -depth \
                -type d \
        find "${bundle_dir}/lib" \
                -depth \
                -type d \
-               -exec rmdir {} \; \
-       || true
+               -empty \
+               -exec rmdir {} \;
 }
 
 Linux::getRpath () {
 }
 
 Linux::getRpath () {