diff options
author | Márcio Silva <coadde at hyperbola dot info> | 2017-06-03 07:35:15 -0300 |
---|---|---|
committer | Márcio Silva <coadde at hyperbola dot info> | 2017-06-03 07:35:15 -0300 |
commit | 7eb1df0ef4ccc5bc3e9c5a74dea6a5b796cc3cb4 (patch) | |
tree | 04af6018248ea197b368043ee9fea6c48c28e224 /issues_change_detector | |
parent | ae928016bf637b26326ec335b10898c6c2b0e4b9 (diff) | |
download | hyperbot-7eb1df0ef4ccc5bc3e9c5a74dea6a5b796cc3cb4.tar.lz hyperbot-7eb1df0ef4ccc5bc3e9c5a74dea6a5b796cc3cb4.tar.xz hyperbot-7eb1df0ef4ccc5bc3e9c5a74dea6a5b796cc3cb4.zip |
update issues_change_detector from pbot-ng, change unknown ip6 2001:ba8:1f1:f216::5 to ::1, ignore bot_settings.sh, fix description on hack_of_all_hacks
Diffstat (limited to 'issues_change_detector')
-rwxr-xr-x | issues_change_detector | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/issues_change_detector b/issues_change_detector index 50479d9..04a6c9b 100755 --- a/issues_change_detector +++ b/issues_change_detector @@ -14,30 +14,34 @@ shopt -s extglob next_line_is_url=0 inotifywait -m --format '%w%f' -e create "${maildir}" 2>/dev/null | -while read email -do - while read line + while read email do - case "${line}" in - 'Subject: ['* ) - lp1="${line#Subject: [}" - lp="${lp1%% - *}" - echo -n "${lp}" - ;; - 'Issue #'* ) - echo -n " - ${line}" - ;; - *' #'+([[:digit:]])': '* ) - echo -n " (${line#'Bug #'+([[:digit:]])': '})" - next_line_is_url=1 - ;; - 'https://issues.hyperbola.info/issues/'* ) - (( next_line_is_url )) && - echo -n " ${line}" - break - ;; - esac - done < "${email}" + while read line + do + case "${line}" in + 'Subject: ['* ) + lp1="${line#Subject: [}" + lp="${lp1%% - *}" + echo -n "${lp}" + ;; + 'Issue #'* ) + echo -n " - ${line}" + ;; + *' #'+([[:digit:]])': '* ) + echo -n " (${line#'Bug #'+([[:digit:]])': '})" + next_line_is_url=1 + ;; + 'https://labs.parabola.nu/issues/'* ) + (( next_line_is_url )) && + echo -n " ${line}" + break + ;; + esac + done < "${email}" - echo -done >> "${bot_ipc}" + echo + done | + while read message + do + echo "${message}" >> "${bot_ipc}" + done |