Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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.'
;;