X-Git-Url: https://git.madduck.net/code/fbi-announce.git/blobdiff_plain/2b20f344a8dab1197704d05fdb178b07838f8c7e..d32a30a0800d96a7896a00fc204567443876e18f:/fbi-announce.sh diff --git a/fbi-announce.sh b/fbi-announce.sh index abba489..eb0329c 100755 --- a/fbi-announce.sh +++ b/fbi-announce.sh @@ -23,19 +23,7 @@ # [@@component@@/]@@project@@: @@author@@: \ # @@logmessage@@ [@@ref@@] @@url@@) # -# The hook is meant ot be run either from a post-commit hook or an update hook. If run in -# a central repository where people push to you want to run it in the update hook! -# -# post-commit: It parses latest commit and current HEAD to get the information it needs. -# -# update: You have to call it once per merged commit: -# -# refname=$1 -# oldhead=$2 -# newhead=$3 -# for merged in $(git rev-list ${oldhead}..${newhead} | tac) ; do -# /path/to/ciabot.bash ${refname} ${merged} -# done +# The hook is meant ot be run from the Git post-receive hook. # set -eu @@ -58,7 +46,7 @@ from=$(git config hooks.fbi-emailsender 2>/dev/null ||:) to="commit@commit.ganneff.de" #TODO: possibly factor out to config # mail submission client to use -if [ -n "$FBI_ANNOUNCE_TO_STDOUT" ]; then +if [ -n "${FBI_ANNOUNCE_TO_STDOUT:-}" ]; then sendmail="cat" echo >&2 'I: outputting to stdout since $FBI_ANNOUNCE_TO_STDOUT is set.' else @@ -99,7 +87,7 @@ ${sendmail} <<_eom ${from:+From: ${from} }To: ${to} Subject: Announce ${project} -Message-ID: +Message-Id: ${msg} _eom