summaryrefslogtreecommitdiffstats
path: root/debian/local
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:31:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:31:26 +0000
commitf686102cc3129b62339e3166afdf492015deee07 (patch)
treed0f5387a7b3c5b218b921f58a70db6067bc93e28 /debian/local
parentAdding upstream version 2.19+dfsg. (diff)
downloadirker-f686102cc3129b62339e3166afdf492015deee07.tar.xz
irker-f686102cc3129b62339e3166afdf492015deee07.zip
Adding debian version 2.19+dfsg-1.debian/2.19+dfsg-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/local')
-rwxr-xr-xdebian/local/irkerhook-debian27
-rwxr-xr-xdebian/local/irkerhook-git17
2 files changed, 44 insertions, 0 deletions
diff --git a/debian/local/irkerhook-debian b/debian/local/irkerhook-debian
new file mode 100755
index 0000000..1f05304
--- /dev/null
+++ b/debian/local/irkerhook-debian
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+_MESSAGE="${@}"
+
+_PROGRAM="$(basename ${0})"
+
+for _FILE in "/etc/default/${_PROGRAM}" "/etc/default/${_PROGRAM}.d"/*
+do
+ if [ -e "${_FILE}" ]
+ then
+ . "${_FILE}" || true
+ fi
+done
+
+if [ "${IRK_ENABLED}" != "true" ]
+then
+ exit 0
+fi
+
+echo "sending IRC notification"
+
+for IRC_CHANNEL in ${IRC_CHANNELS}
+do
+ irk ${IRC_CHANNEL} "${_MESSAGE}"
+done
diff --git a/debian/local/irkerhook-git b/debian/local/irkerhook-git
new file mode 100755
index 0000000..1f746e8
--- /dev/null
+++ b/debian/local/irkerhook-git
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "$(git config --get irker.project)" -a -z "$(git config --get irker.template)" ]
+then
+ echo "CONFIGURATION ERROR: Neither irker.project nor irker.template defined"
+ echo "NOT sending IRC notification"
+ exit 0
+fi
+
+echo "sending IRC notification"
+
+while read old new refname
+do
+ irkerhook --refname=${refname} $(git rev-list --reverse ${old}..${new})
+done