From 019fdbd77a60d54dceb0cc400a943cc2fc220497 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 3 Dec 2017 21:36:04 +0100 Subject: bin/interpret-mail: output something if no valid records found, too --- bin/interpret-mail | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'bin/interpret-mail') diff --git a/bin/interpret-mail b/bin/interpret-mail index 19e2e7b..2b2974f 100755 --- a/bin/interpret-mail +++ b/bin/interpret-mail @@ -186,9 +186,7 @@ sed -n "$( if [ -s "${tmp_dir}/block" ]; then if run_and_log_on_error "${base_dir}/bin/modify-package-state" --block "${tmp_dir}/block"; then - if [ -s "${tmp_dir}/block" ]; then - log 'Successfully blocked %s packages.\n' "$(wc -l < "${tmp_dir}/block")" - fi + log 'Successfully blocked %s packages.\n' "$(wc -l < "${tmp_dir}/block")" else log 'There was an error while blocking the packages - ignoring this message.\n' fi @@ -199,9 +197,7 @@ if [ -s "${tmp_dir}/stabilize" ]; then /\.pkg\.tar\.xz$/!s/$/.pkg.tar.xz/ ' "${tmp_dir}/stabilize" if run_and_log_on_error "${base_dir}/bin/modify-package-state" --tested "${tmp_dir}/stabilize"; then - if [ -s "${tmp_dir}/stabilize" ]; then - log 'Successfully marked %s packages as tested.\n' "$(wc -l < "${tmp_dir}/stabilize")" - fi + log 'Successfully marked %s packages as tested.\n' "$(wc -l < "${tmp_dir}/stabilize")" else log 'There was an error while marking the packages as tested - ignoring this message.\n' fi @@ -209,9 +205,7 @@ fi if [ -s "${tmp_dir}/unblock" ]; then if run_and_log_on_error "${base_dir}/bin/modify-package-state" --unblock "${tmp_dir}/unblock"; then - if [ -s "${tmp_dir}/unblock" ]; then - log 'Successfully unblocked %s packages.\n' "$(wc -l < "${tmp_dir}/unblock")" - fi + log 'Successfully unblocked %s packages.\n' "$(wc -l < "${tmp_dir}/unblock")" else log 'There was an error while unblocking the packages - ignoring this message.\n' fi @@ -228,7 +222,5 @@ if [ -s "${tmp_dir}/schedule" ]; then done ) | \ sponge "${tmp_dir}/schedule" - if [ -s "${tmp_dir}/schedule" ]; then - log 'Successfully (re)scheduled %s packages.\n' "$(wc -l < "${tmp_dir}/schedule")" - fi + log 'Successfully (re)scheduled %s packages.\n' "$(wc -l < "${tmp_dir}/schedule")" fi -- cgit v1.2.3-70-g09d2