[fix] No patches shouldn't warn

This commit is contained in:
ljf 2016-12-14 12:29:02 +01:00
parent 2cd6219769
commit 9a04d653e7

View file

@ -84,10 +84,12 @@ extract_sources() {
rm -f "$tarball" rm -f "$tarball"
# apply patches # apply patches
(cd "$DESTDIR" \ if [[ -d "${PKGDIR}/patches" ]]; then
&& for p in ${PKGDIR}/patches/*.patch; do \ (cd "$DESTDIR" \
exec_as "$AS_USER" patch -p1 < $p; done) \ && for p in ${PKGDIR}/patches/*.patch; do \
|| ynh_die "Unable to apply patches" exec_as "$AS_USER" patch -p1 < $p; done) \
|| ynh_die "Unable to apply patches"
fi
} }
# Execute a command as another user # Execute a command as another user