summaryrefslogtreecommitdiff
path: root/bin/ii-answer
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-11-29 09:17:15 +0100
committerErich Eckner <git@eckner.net>2019-11-29 09:17:15 +0100
commitfff21384f95e8131eb0b041d3bdd6f8eed31cb04 (patch)
tree41eb2304b7875ff072d18f871d197121cf6d2050 /bin/ii-answer
parent6dc9a716c182892ac2129b9905da5ec6503a79b4 (diff)
downloadbuilder-fff21384f95e8131eb0b041d3bdd6f8eed31cb04.tar.xz
bin/ii-answer: give links to bugs, too
Diffstat (limited to 'bin/ii-answer')
-rwxr-xr-xbin/ii-answer11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/ii-answer b/bin/ii-answer
index de06c73..b16f821 100755
--- a/bin/ii-answer
+++ b/bin/ii-answer
@@ -174,6 +174,17 @@ find "${irc_dir}" \
irc_say "${channel}" 'copy'
fi
fi
+ # answer "bug/fs32 <number>"
+ regex='^\S\+ <\(\S\+\)> '"${prefix}"'!\?\([Bb]ug\|[Ff][Ss]\)\(32\)\? \([0-9]\+\)$'
+ if grep -q "${regex}" "${out_file}"; then
+ sed -i '
+ s@'"${regex}"'@\1: https://bugs.archlinux32.org/task/\4@
+ T
+ w /dev/stdout
+ d
+ ' "${out_file}" | \
+ irc_say "${channel}" 'copy'
+ fi
if [ -z "${channel%%#*}" ]; then
# answer "Shut up!"
regex='^\S\+ <\S\+> \(.* \)\?[Ss][Hh][Uu][Tt] \?[Uu][Pp]'