]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - library-bundler
tools: fix compilation on some systems
[xonotic/netradiant.git] / library-bundler
index 235734eac0386f94915e14f82d9b92ae0b12e3eb..54056c41fe527b803fc399d9ab42898931bcf1ee 100755 (executable)
@@ -39,7 +39,7 @@ Common::getPath () {
                if [ "${file_path}" = '-' ]
                then
                        tr '\n' '\0' \
-                       | xargs -0 -n1 -P1 -I{} \
+                       | xargs -0 -P1 -I{} \
                                cygpath --unix '{}'
                else
                        cygpath --unix "${file_path}"
@@ -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 () {
@@ -445,7 +448,7 @@ Windows::listLibForManifest () {
                -name '*.dll' \
                -exec basename {} \; \
        | tr '\n' '\0' \
-       | xargs -0 -n1 -P1 -I{} \
+       | xargs -0 -P1 -I{} \
                printf '  <file name="{}"/>\n'
 }