X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fgit-check.sh;h=4593317f140caaf2cd97d6f1d6dc77702384f96a;hb=2bb2ef3f12a300a878c6a84c0cf4eb48e679b3c6;hp=c15c3c4da981e7eb492a3bb4497db4ab017701d9;hpb=5c62f10cb7040a4497a57e8f2d43b7b9d903fbc6;p=infrastructure.git diff --git a/scripts/git-check.sh b/scripts/git-check.sh index c15c3c4..4593317 100755 --- a/scripts/git-check.sh +++ b/scripts/git-check.sh @@ -1,5 +1,7 @@ #!/bin/sh +MLIST="git@onelab.eu" + cd /git gitwebfiles="git-favicon.png git-logo.png gitweb.cgi gitweb.css" @@ -61,9 +63,9 @@ function check_configs () { git config core.sharedrepository >& /dev/null || { git config core.sharedrepository true; echo -n "sharedrepository "; } git config daemon.uploadpack >& /dev/null || { git config daemon.uploadpack true; echo -n "uploadpack "; } git config daemon.uploadarch >& /dev/null || { git config daemon.uploadarch true; echo -n "uploadarch "; } - git config hooks.mailinglist >& /dev/null || { git config hooks.mailinglist git@onelab.eu; echo -n "mailinglist "; } - git config hooks.announcelist >& /dev/null || { git config hooks.announcelist git@onelab.eu; echo -n "announcelist "; } - git config hooks.envelopesender >& /dev/null || { git config hooks.envelopesender git@onelab.eu; echo -n "envelopesender "; } + (git config hooks.mailinglist|grep $MLIST) >& /dev/null || { git config hooks.mailinglist $MLIST; echo -n "mailinglist "; } + (git config hooks.announcelist|grep $MLIST) >& /dev/null || { git config hooks.announcelist $MLIST; echo -n "announcelist "; } + (git config hooks.envelopesender|grep $MLIST) >& /dev/null || { git config hooks.envelopesender $MLIST; echo -n "envelopesender "; } git config hooks.emailprefix >& /dev/null || { git config hooks.emailprefix ''; echo -n "emailprefix "; } cd - >& /dev/null done @@ -78,7 +80,7 @@ function check_hooks () { git=${b}.git echo -n "$git " # standard version is in /usr/share/doc/git-1.5.5.6/hooks/post-receive-email - (cd $git/hooks; cp -f /root/bin/post-receive-email-with-diffs post-receive ) + (cd $git/hooks; cp -f /root/bin/post-receive-email-with-diffs post-receive; chmod 755 post-receive ) done echo "" }