diff options
author | tv <tv@nomic.retiolum> | 2014-03-14 04:33:13 +0100 |
---|---|---|
committer | tv <tv@nomic.retiolum> | 2014-03-14 04:33:13 +0100 |
commit | d5d9073f5317290b7aa679d930c2718cd1cdec20 (patch) | |
tree | 8d805aea5b3597fa14ca303f6da3b9dfa326034d /git/gitolite-hooks/irc-announce | |
parent | cd2e096f32cc1baa325c3dcdc0c51e7a9f5052f8 (diff) |
irc-announce: fix conflict resolution fail
Diffstat (limited to 'git/gitolite-hooks/irc-announce')
-rwxr-xr-x | git/gitolite-hooks/irc-announce | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/git/gitolite-hooks/irc-announce b/git/gitolite-hooks/irc-announce index ca8b0059..aa9f91f3 100755 --- a/git/gitolite-hooks/irc-announce +++ b/git/gitolite-hooks/irc-announce @@ -1,13 +1,18 @@ #! /bin/sh set -euf +config_file="$HOME/.local/krebs/irc-announce" +if test -f "$config_file"; then + . "$config_file" +fi + # XXX when changing IRC_CHANNEL or IRC_SERVER/_PORT, don't forget to update # any relevant gitolite LOCAL_CODE! # CAVEAT we hope that IRC_NICK is unique -IRC_NICK="gl$GL_TID" -IRC_CHANNEL='#retiolum' -IRC_SERVER='ire.retiolum' -IRC_PORT=6667 +IRC_NICK="${IRC_NICK-gl$GL_TID}" +IRC_CHANNEL="${IRC_CHANNEL-#retiolum}" +IRC_SERVER="${IRC_SERVER-ire.retiolum}" +IRC_PORT="${IRC_PORT-6667}" # for privmsg_cat below export IRC_CHANNEL @@ -86,6 +91,11 @@ privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; } | privmsg_cat \ | cat2 + echo2 "PART $IRC_CHANNEL" + + # TESTME does this sleep help to send all messages? + sleep 5 + echo2 'QUIT :Gone to have lunch' printf |