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/
+ install -o root -g root -m 0755 cron.auf-git-etc $(DESTDIR)/usr/sbin/
clean:
rm configure-stamp build-stamp debuild-stamp
-if [ -n "$PS1" ]; then
- # on lance un git status sur l'utilisateur s'il est dans le groupe
- # admin ou bien si c'est root
- if $(id -Gn | grep -qw admin) || test $(id -u) -eq 0; then
- [ -x /usr/bin/git -a -d /.git ] && (cd / ; sudo /usr/bin/git status -a)
+if test -n "$PS1"; then
+ # on lance un git status sur l'utilisateur s'il est dans le groupe admin
+ # ou bien si c'est root
+ if `id -Gn | grep -qw admin` || test `id -u` -eq 0; then
+ test -x /usr/bin/git -a -d /.git && (cd / ; sudo /usr/bin/git status -a)
fi
# les lignes suivantes tentent de configurer les variables GIT_*
# si les résultats ne sont pas bien "devinés", définir les bonnes
# valeurs dans .bash_profile (ou .profile pour root)
if test -z "$GIT_AUTHOR_NAME"; then
- GIT_AUTHOR_NAME="$(getent passwd $(id -un)|cut -d: -f5|cut -d, -f1)"
+ GIT_AUTHOR_NAME="`getent passwd $(id -un)|cut -d: -f5|cut -d, -f1`"
fi
if test -z "$GIT_AUTHOR_EMAIL"; then
- GIT_AUTHOR_EMAIL="$(id -un)@$(hostname -f)"
+ GIT_AUTHOR_EMAIL="`id -un`@`hostname -f`"
fi
if test -z "$GIT_COMMITTER_NAME"; then
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
+++ /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
--- /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.1) stable; urgency=low
+
+ * On impose sudo !
+ * Et quelques changements cosmétiques...
+
+ -- Progfou <jean-christophe.andre@auf.org> Fri, 03 Oct 2008 08:17:21 +0700
+
auf-git-etc (1.3) stable; urgency=low
* Ajout d'une tâche planifiée pour alerter sur les commit non faits.
Package: auf-git-etc
Architecture: all
-Depends: git-core, ${misc:Depends}
-Recommends: sudo, exim4 | mail-transport-agent
+Depends: git-core, sudo, ${misc:Depends}
+Recommends: exim4 | mail-transport-agent
Suggests: tig
Description: suivi de /etc et /usr/local via git
Ce paquet permet d'automatiser l'installation d'un suivi de /etc,
#
# Regular cron jobs for the auf-git-etc package
#
-0 10,16 * * 1-5 root /usr/sbin/auf-git-etc_cron cron
+0 10,16 * * 1-5 root /usr/sbin/cron.auf-git-etc cron