From 55bb0573193991f90bfd32780afd280be3699689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 22 Mar 2018 21:13:23 +0100 Subject: [PATCH] debian: display the number of patches OK and in error in script build-debian.sh --- tools/build-debian.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/build-debian.sh b/tools/build-debian.sh index 0cdee0fbe..b543588ee 100755 --- a/tools/build-debian.sh +++ b/tools/build-debian.sh @@ -107,15 +107,19 @@ error_usage () test_patches () { set +e - RET_CODE=0 + PATCHES_OK=0 + PATCHES_ERROR=0 for file in ${ROOT_DIR}/tools/debian/patches/*.patch; do echo "=== Testing patch ${file} ===" git apply --check "${file}" - if [ $? -ne 0 ]; then - RET_CODE=1 + if [ $? -eq 0 ]; then + PATCHES_OK=$((PATCHES_OK+1)) + else + PATCHES_ERROR=$((PATCHES_ERROR+1)) fi done - exit ${RET_CODE} + echo "Patches: ${PATCHES_OK} OK, ${PATCHES_ERROR} in error." + exit ${PATCHES_ERROR} } # ================================== START ==================================