Commit | Line | Data |
---|---|---|
89e5ff8d | 1 | #!/bin/sh |
36462167 | 2 | recipients="root+git" # adresse pour l'envoi du mail |
8b3c87f0 P |
3 | # On modifie un peu la sortie de git show : |
4 | # 1) on ajoute "From git hostname" devant le nom en From | |
5 | # 2) on retire le [PATCH] dans le sujet, replacé par git-commit: | |
6 | # 3) on ajoute un champ To: | |
7 | # et on envoie le tout via sendmail | |
8 | PATH=/usr/sbin:/usr/bin:/sbin:/bin | |
9 | git show --pretty=email | | |
25469895 | 10 | sed -e '1,6s/^From: /From: git '`hostname -f`' - /' \ |
89e5ff8d | 11 | -e '1,6s/^Subject: \[PATCH\]/Subject: git-commit:/' \ |
96eb6687 P |
12 | -e '3iTo: '"${recipients}" \ |
13 | -e '4iContent-Type: text/plain; charset=utf-8' | | |
8b3c87f0 P |
14 | head -c 16k | /usr/sbin/sendmail ${recipients} |
15 | exit 0 |