install: build
install -o root -g root -m 0644 auf-git-etc.sh $(DESTDIR)/etc/profile.d/
+ install -o root -g root -m 0755 auf-git-etc_cron $(DESTDIR)/usr/sbin/
clean:
rm configure-stamp build-stamp debuild-stamp
test:
- debuild -I.git -I*.ex -b -us -uc
+ debuild -I.git -I*.ex -b -us -uc -tc
rsync -avP ../auf-git-etc_*.deb test.vn.auf.org:/tmp/
debuild: debuild-stamp
touch debuild-stamp
release: debuild
- debrelease --dput auf-etch
+ debrelease --dput auf-debian
--- /dev/null
+#!/bin/sh
+recipients="root+git" # adresse pour l'envoi du mail
+
+if [ "$1" != "cron" ]; then
+ echo "Ce script n'est pas fait pour être lancé manuellement mais via cron."
+ exit -1
+fi
+
+[ -x /usr/bin/git -a -d /.git ] || exit 0
+
+cd /
+(
+ echo "From: git `hostname -f` - Cron Daemon <root+git@`cat /etc/mailname`>"
+ echo "To: ${recipients}"
+ echo "Date: `date --rfc-2822`"
+ echo "Subject: git-status: `hostname -f` - $0"
+ echo "Content-Type: text/plain; charset=utf-8"
+ echo ""
+ echo "Voici la liste de modifications qui n'ont pas encore été validées :"
+ echo "( voir http://wiki.auf.org/wikiteki/Git/SuiviDeConfiguration )"
+ echo ""
+ /usr/bin/git status -a | sed -e '/^nothing to commit/d' -e 's/^#//'
+) | head -c 16k | /usr/sbin/sendmail ${recipients}
+exit 0
+auf-git-etc (1.3) stable; urgency=low
+
+ * Ajout d'une tâche planifiée pour alerter sur les commit non faits.
+
+ -- Progfou <jean-christophe.andre@auf.org> Fri, 03 Oct 2008 03:20:10 +0700
+
auf-git-etc (1.2) stable; urgency=low
* Tenons compte de l'existant...
--- /dev/null
+MAILTO=root+git
+#
+# Regular cron jobs for the auf-git-etc package
+#
+0 10,16 * * 1-5 root /usr/sbin/auf-git-etc_cron cron
# dh_installmime
# dh_python
# dh_installinit
-# dh_installcron
+ dh_installcron
# dh_installinfo
# dh_installman
# dh_link
# et on envoie le tout via sendmail
PATH=/usr/sbin:/usr/bin:/sbin:/bin
git show --pretty=email |
- sed -e '1,6s/^From: /From: '`hostname -f`' - /' \
+ sed -e '1,6s/^From: /From: git '`hostname -f`' - /' \
-e '1,6s/^Subject: \[PATCH\]/Subject: git-commit:/' \
-e '3iTo: '"${recipients}" |
head -c 16k | /usr/sbin/sendmail ${recipients}