Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-23 08:55:58 +0200
committerErich Eckner <git@eckner.net>2018-04-23 08:58:11 +0200
commit317a62223535ecec121c19f7b10c590ee3b2e7a7 (patch)
tree5668f9d0e7f5ed6f2ee70ee99b4948233e9e5c18 /bin
parent4e708195f1ccb3c2abad5cc6335b4b5d7dd17ffa (diff)
bin/ii-connect: "whatsup" new
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ii-connect10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/ii-connect b/bin/ii-connect
index ca8ea99..d678af1 100755
--- a/bin/ii-connect
+++ b/bin/ii-connect
@@ -79,8 +79,10 @@ if [ "$1" = 'watch' ]; then
channel="${channel##*/}"
if [ -z "${channel%%#*}" ]; then
prefix='buildmaster: '
+ sloppy_salutation='buildmaster'
else
prefix=''
+ sloppy_salutation=''
fi
regex='^\(\S\+ \)\?\S\+ <\S\+> '"${prefix}"'why[- ]don'"'"'\?t[- ]you \(build\|stabilize\|unstage\|keep\|stubbornly_keep\) '
if grep -q "${regex}" "${out_file}"; then
@@ -130,6 +132,14 @@ if [ "$1" = 'watch' ]; then
done
sed -i "/${regex}/d" "${out_file}"
fi
+ regex='^\(\S\+ \)\?\S\+ <\S\+> .*[Ww]hat'"'"'\?s *[Uu]p'
+ if grep "${regex}" "${out_file}" | \
+ grep -q "${sloppy_salutation}"; then
+ done_something=true
+ sed -i "/${regex}/d" "${out_file}"
+ printf 'up? I'"'"'m up for %s, %s\n' "$(uptime -p | sed 's/^up //')" "$(uptime | sed 's/.*, //')" | \
+ sponge "${out_file%/out}/in"
+ fi
done
sleep 1
done