From 244ba508410df962f5166b6876a254d89d455d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 8 Sep 2024 09:26:04 +0200 Subject: [PATCH] core: fix test of Debian patches when there are no patches --- tools/build_debian.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/build_debian.sh b/tools/build_debian.sh index 67a3c8b07..49532e177 100755 --- a/tools/build_debian.sh +++ b/tools/build_debian.sh @@ -110,11 +110,13 @@ test_patches () PATCHES_OK=0 PATCHES_ERROR=0 for file in "${ROOT_DIR}"/tools/debian/patches/*.patch; do - echo "=== Testing patch ${file} ===" - if git apply --check "${file}"; then - PATCHES_OK=$((PATCHES_OK+1)) - else - PATCHES_ERROR=$((PATCHES_ERROR+1)) + if [ -f "${file}" ]; then + echo "=== Testing patch ${file} ===" + if git apply --check "${file}"; then + PATCHES_OK=$((PATCHES_OK+1)) + else + PATCHES_ERROR=$((PATCHES_ERROR+1)) + fi fi done echo "Patches: ${PATCHES_OK} OK, ${PATCHES_ERROR} in error."