index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-01-03 15:27:48 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-03 15:27:48 +0100 |
commit | 1feca7e5466dec92bba8ffb088aef21c07e1a4bc (patch) | |
tree | 077e7c056230f26ba58ebcb867e5ed4ed4bdc13e | |
parent | bbc75ad1f15f7ffa5174ac607c54b9ff17720178 (diff) |
-rwxr-xr-x | bin/ii-connect | 31 | ||||
-rwxr-xr-x | conf/default.conf | 4 |
diff --git a/bin/ii-connect b/bin/ii-connect new file mode 100755 index 0000000..5c38367 --- /dev/null +++ b/bin/ii-connect @@ -0,0 +1,31 @@ +#!/bin/sh + +# run and handle the irc client + +# shellcheck source=conf/default.conf +. "${0%/*}/../conf/default.conf" + +# start ii if it is not running +if ! pgrep -x ii > /dev/null; then + rm -rf --one-file-system "${irc_dir}" + screen -d -m ii -f buildmaster -n buildmaster + sleep 10 +fi + +# register if not yet done +if tail -n1 "${irc_dir}/nickserv/out" 2> /dev/null | \ + grep -qF 'This nickname is registered. Please choose a different nickname'; then + printf 'identify %s\n' "${irc_password}" > \ + "${irc_dir}/nickserv/in" +fi + +# join #archlinux-ports if not yet done +if ! grep ' buildmaster\.archlinux32\.org .* buildmaster$' "${irc_dir}/out" | \ + tail -n1 | \ + grep -q ' #archlinux-ports '; then + { + echo '/j #archlinux-ports' + echo '/WHO buildmaster' + } > \ + "${irc_dir}/in" +fi diff --git a/conf/default.conf b/conf/default.conf index 34c1ccf..a73c3db 100755 --- a/conf/default.conf +++ b/conf/default.conf @@ -96,6 +96,10 @@ staging_package_repositories=$( printf '%s\n' 'community-staging' 'staging' ) +# irc client configuration +irc_dir='/home/slave/irc/irc.freenode.net' +irc_password='top_secret' + # possibly pull in custom modifications # shellcheck source=/dev/null |