summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-03-22 21:13:23 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-03-22 21:13:23 +0100
commit55bb0573193991f90bfd32780afd280be3699689 (patch)
tree58b7a68f973c31f98bb07b64147eab9a303f9932 /tools
parent3de28af6cd3658a8f8131db9cc27c0a03061ecbd (diff)
downloadweechat-55bb0573193991f90bfd32780afd280be3699689.zip
debian: display the number of patches OK and in error in script build-debian.sh
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-debian.sh12
1 files 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 ==================================