Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-04-25 13:55:32 +0200
committerErich Eckner <git@eckner.net>2020-04-25 13:55:32 +0200
commit5cba2a96e203e74229128e94dd91051dba30c28f (patch)
tree2f5b652e918ee4c686ceb9950f73820b4ea55fab
parenteb80efa196a3cc144973671af4bbbc623179bdb0 (diff)
bin/ii-answer: sanity-check can now be triggered from irc
-rwxr-xr-xbin/ii-answer14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/ii-answer b/bin/ii-answer
index b16f821..1139064 100755
--- a/bin/ii-answer
+++ b/bin/ii-answer
@@ -147,6 +147,20 @@ find "${irc_dir}" \
sort -u | \
irc_say "${channel}" 'copy'
fi
+ # answer "sanity-check"
+ regex='^\S\+ <\S\+> .*[Gg]et.*\(straight\|together\)'
+ if grep "${regex}" "${out_file}" | \
+ grep -q "${sloppy_salutation}"; then
+ sed -i "/${regex}/d" "${out_file}"
+ if [ -s "${work_dir}/build-master-sanity" ]; then
+ printf 'I will check my sanity again.\n' \
+ | irc_say "${channel}" 'copy'
+ sanity-check -w
+ else
+ printf 'Are you kidding? I'"'"'m all right.\n' \
+ | irc_say "${channel}" 'copy'
+ fi
+ fi
# answer "say/tell ... new/random/more"
regex='^\S\+ <\(\S\+\)> \(.* \)\?\([Ss]ay\|[Tt]ell\).*\(new\|random\|more\).*'
if grep "${regex}" "${out_file}" | \