------------------------------------------------------------ revno: 5137 committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx> branch nick: trunk timestamp: Mon 2010-11-08 14:34:20 +0100 message: removed mailer script it is unused and seems to be not required in the future, as hipl-dev serves email-notifications. removed: tools/mailer.sh -- lp:hipl https://code.launchpad.net/~hipl-core/hipl/trunk Your team HIPL core team is subscribed to branch lp:hipl. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== removed file 'tools/mailer.sh' --- tools/mailer.sh 2010-10-01 15:30:25 +0000 +++ tools/mailer.sh 1970-01-01 00:00:00 +0000 @@ -1,64 +0,0 @@ -#!/bin/sh -# -# Mailer script that notifies about commits to a BZR repo -# -# Copyright (c) 2010 Mircea Gherzan <mgherzan@xxxxxxxxx> -# -# This script has multiple issues that need to be fixed before it is put in -# production use: -# - temporary files are created in an insecure predictable fashion, -# - storing the last revision in /tmp will fail if the machine gets -# rebooted and /tmp is deleted, as is often the case. - -# path to the BZR repository -REPO=/home/$USER/src/hipl -# path to the file containing the last processed revision -LASTREV=/tmp/mailer_lastrev.txt -# buffer used to build the body of the e-mail -MAILBUF=/tmp/mailer_buffer.txt - -# mailing coordinates -SENDTO=hipl-core@xxxxxxxxxxxxxxxxxxx -REPLYTO=hipl-core@xxxxxxxxxxxxxxxxxxx - -##################################################################### - -if [ ! -e $LASTREV ]; then - echo File with the last revno does not exist! - echo Please create $LASTREV - exit 1 -fi - -read lastrev < $LASTREV - -# from now on, working in the BZR repo -cd $REPO || exit 1 - -# update the repo to get the last revision -bzr up - -# get the HEAD revision (the last one) -head=$(bzr revno) - -# lastrev was already processed, so incrementing it -lastrev=$(($lastrev + 1)) - -for rev in $(seq $lastrev $head); do - committer=$(bzr log -r $rev | head -3 | tail -1 | sed -e "s/committer: //g") - branch=$(bzr log -r $rev | head -4 | tail -1 | sed -e "s/branch nick: //g") - firstline=$(bzr log -r $rev | head -7 | tail -1 | sed -e "s/^ *//") - - subject="[$branch] $rev: $firstline" - - # create the body of the e-mail - bzr log -r $rev | tail -n +7 > $MAILBUF - echo "" >> $MAILBUF - bzr diff -c $rev >> $MAILBUF - - # send the e-mail - mailx -s "$subject" -Sfrom="$committer" -Sreplyto=$REPLYTO $SENDTO < $MAILBUF -done - -echo $head > $LASTREV - -exit 0