From ba571bc680746720270a81dbb1722ef18b0cf14e Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Fri, 19 Oct 2018 12:35:34 +0300 Subject: [PATCH] Wine PKGBUILD: consider case 'no patches found' --- 0-wine-staging-git/PKGBUILD | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/0-wine-staging-git/PKGBUILD b/0-wine-staging-git/PKGBUILD index 60bf1af..66f25ad 100644 --- a/0-wine-staging-git/PKGBUILD +++ b/0-wine-staging-git/PKGBUILD @@ -196,14 +196,16 @@ build() { ${staging_patchsets[*]} fi - # Apply all custom patches - msg2 "Applying custom patches..." + if [[ $(ls "${srcdir}"/*.patch | wc -w) -ne 0 ]]; then - cd "${srcdir}"/wine-git - for i in $srcdir/*.patch - do - patch -Np1 < $i - done + cd "${srcdir}"/wine-git + # Apply all custom patches + msg2 "Applying custom patches..." + + for i in "${srcdir}"/*.patch; do + patch -Np1 < ${i} + done + fi cd "${srcdir}"