summaryrefslogtreecommitdiff
path: root/bin/why-dont-you
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-26 14:31:00 +0100
committerErich Eckner <git@eckner.net>2020-02-26 14:31:00 +0100
commit12063e276f9d19e52a0f9fa5f7bafbd74a1b9ada (patch)
treeaaf6a2ce5dcf5598078f952defba862f8f194320 /bin/why-dont-you
parentbfa69561d1b5c91d2eeea2822c7762da4c68c6eb (diff)
downloadbuilder-12063e276f9d19e52a0f9fa5f7bafbd74a1b9ada.tar.xz
bin/why-dont-you: add responses in case of no other responses
Diffstat (limited to 'bin/why-dont-you')
-rwxr-xr-xbin/why-dont-you10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 61eae34..e6a0deb 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -212,6 +212,8 @@ case "${action}" in
fi
for pkgname in "$@"; do
+ printf 'Cannot find package "%s"\n' "${pkgname}" \
+ > "${tmp_dir}/error"
# shellcheck disable=SC2016
{
printf 'SELECT'
@@ -242,6 +244,7 @@ case "${action}" in
} \
| mysql_run_query 'unimportant' \
| while read -r bpir tested issues; do
+ rm -f "${tmp_dir}/error"
if [ "${tested}" = '0' ]; then
printf '"%s" is not tested.\n' \
"${pkgname}"
@@ -255,6 +258,9 @@ case "${action}" in
printf '%s\n' "${bpir}" \
>> "${tmp_dir}/packages"
done
+ if [ -s "${tmp_dir}/error" ]; then
+ cat "${tmp_dir}/error"
+ fi
done
if [ ! -s "${tmp_dir}/packages" ]; then
@@ -358,7 +364,9 @@ case "${action}" in
printf ') AS `sub_q`'
printf ' GROUP BY `sub_q`.`id`;\n'
} \
- | mysql_run_query 'unimportant'
+ | mysql_run_query 'unimportant' \
+ | grep -F '' \
+ || echo 'This should be a no-brainer.'
;;