From df4acd5d3db71f14ed3cd0b1cb7c9002baee1c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 8 Sep 2024 09:27:50 +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 320cad598..b3e10707e 100755 --- a/tools/build_debian.sh +++ b/tools/build_debian.sh @@ -109,11 +109,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."