From 503faaccf82a7945b3808c73b340ed42d203431d Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 18 Oct 2019 23:00:51 +0200 Subject: [PATCH] coverage.sh: in addition to cmp, run diffoscope and base64 and xxd --- coverage.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/coverage.sh b/coverage.sh index eb8ebd2..294092c 100755 --- a/coverage.sh +++ b/coverage.sh @@ -117,7 +117,28 @@ tar -C /tmp/debian-$dist-debootstrap -xf "cache/debian-$dist-$variant.tar" # delete the directory tar -C /tmp/debian-$dist-debootstrap -cf dev1.tar ./dev tar -C /tmp/debian-$dist-mm -cf dev2.tar ./dev -cmp dev1.tar dev2.tar +ret=0 +cmp dev1.tar dev2.tar || ret=\$? +if [ "\$ret" -ne 0 ]; then + if type diffoscope >/dev/null; then + diffoscope dev1.tar dev2.tar + else + echo "no diffoscope installed" >&2 + fi + if type base64 >/dev/null; then + base64 dev1.tar + base64 dev2.tar + else + echo "no base64 installed" >&2 + fi + if type xxd >/dev/null; then + xxd dev1.tar + xxd dev2.tar + else + echo "no xxd installed" >&2 + fi + exit 1 +fi rm dev1.tar dev2.tar rm -r /tmp/debian-$dist-debootstrap/dev /tmp/debian-$dist-mm/dev