eclass/java-utils-2.eclass: Added -r to xargs in java-pkg_addres

The -r option is necessary in case find does not output anything. Which
makes the jar uf command fail. This has no effect otherwise and should
be safe to add right away. It prevents potential issues/bug.
This commit is contained in:
William L. Thomson Jr
2016-02-22 10:29:47 +00:00
committed by James Le Cuirot
parent 52a17779a3
commit 75b71f8afb
+1 -1
View File
@@ -262,7 +262,7 @@ java-pkg_addres() {
shift 2
pushd "${dir}" > /dev/null || die "pushd ${dir} failed"
find -L -type f ! -path "./target/*" ! -path "./sources.lst" ! -name "MANIFEST.MF" ! -regex ".*\.\(class\|jar\|java\)" "${@}" -print0 | xargs -0 jar uf "${jar}" || die "jar failed"
find -L -type f ! -path "./target/*" ! -path "./sources.lst" ! -name "MANIFEST.MF" ! -regex ".*\.\(class\|jar\|java\)" "${@}" -print0 | xargs -r0 jar uf "${jar}" || die "jar failed"
popd > /dev/null || die "popd failed"
}