From 9a04d653e7b3d128fa9401be12fec2988fa425ab Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 14 Dec 2016 12:29:02 +0100 Subject: [PATCH] [fix] No patches shouldn't warn --- scripts/_common.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index a2042d3..5c77665 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -84,10 +84,12 @@ extract_sources() { rm -f "$tarball" # apply patches - (cd "$DESTDIR" \ - && for p in ${PKGDIR}/patches/*.patch; do \ - exec_as "$AS_USER" patch -p1 < $p; done) \ - || ynh_die "Unable to apply patches" + if [[ -d "${PKGDIR}/patches" ]]; then + (cd "$DESTDIR" \ + && for p in ${PKGDIR}/patches/*.patch; do \ + exec_as "$AS_USER" patch -p1 < $p; done) \ + || ynh_die "Unable to apply patches" + fi } # Execute a command as another user