index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/ii-answer | 10 |
diff --git a/bin/ii-answer b/bin/ii-answer index bc1784c..3f6f94e 100755 --- a/bin/ii-answer +++ b/bin/ii-answer @@ -42,10 +42,10 @@ find "${irc_dir}" \ sloppy_salutation='' fi # answer "why don't you?" - regex='^\(\S\+ \)\?\S\+ <\S\+> '"${prefix}"'!\?why[- ]don'"'"'\?t[- ]you \(build\|stabilize\|unstage\|keep\|stubbornly_keep\) ' + regex='^\S\+ <\S\+> '"${prefix}"'!\?why[- ]don'"'"'\?t[- ]you \(build\|stabilize\|unstage\|keep\|stubbornly_keep\) ' if grep -q "${regex}" "${out_file}"; then sed -i ' - s/'"${regex}"'/\2 / + s/'"${regex}"'/\1 / T w /dev/stdout d @@ -66,7 +66,7 @@ find "${irc_dir}" \ done fi # answer "wtf?" - regex='^\(\S\+ \)\?\S\+ <\S\+> '"${prefix}"'!\?wtf ' + regex='^\S\+ <\S\+> '"${prefix}"'!\?wtf ' if grep -q "${regex}" "${out_file}"; then sed -i ' s/'"${regex}"'// @@ -90,7 +90,7 @@ find "${irc_dir}" \ done fi # answer "What's up?" - regex='^\(\S\+ \)\?\S\+ <\S\+> .*[Ww]hat'"'"'\?s *[Uu]p' + regex='^\S\+ <\S\+> .*[Ww]hat'"'"'\?s *[Uu]p' if grep "${regex}" "${out_file}" | \ grep -q "${sloppy_salutation}"; then sed -i "/${regex}/d" "${out_file}" @@ -106,7 +106,7 @@ find "${irc_dir}" \ irc_say "${channel}" 'copy' fi # answer "Thanks!" - regex='^\(\S\+ \)\?\S\+ <\S\+> \(.* \)\?[Tt]h\(anks\|x\)\([ ,.!]\|$\)' + regex='^\S\+ <\S\+> \(.* \)\?[Tt]h\(anks\|x\)\([ ,.!]\|$\)' if grep "${regex}" "${out_file}" | \ grep -q "${sloppy_salutation}"; then sed -i "/${regex}/d" "${out_file}" |