#! /bin/sh # Origin: http://blog.gorwits.me.uk/index.html%3Fp=529.html if [ -z "$3" ]; then echo "Usage: $0 PROJECTNAME REPONAME MLIST prefix [maxlines]" >&2 exit 1 fi PROJECTNAME="$1" REPONAME="$2" MLIST="$3" prefix="$4" maxlines="$5" cd /home/git/p/"$PROJECTNAME/$REPONAME".git && echo "$PROJECTNAME git repository ($REPONAME)" > description #git config --global --bool receive.denyNonFastForwards true && #curl -L -o hooks/post-receive-user https://git.kernel.org/cgit/git/git.git/plain/contrib/hooks/post-receive-email && #http://tinyurl.com/git-post-commit-email wget -O hooks/post-receive-user https://git.kernel.org/cgit/git/git.git/plain/contrib/hooks/post-receive-email && chmod u=rwx,go=rx hooks/post-receive-user && #git config hooks.diffopts "--stat --summary --find-copies-harder -p" && if [ -n "$maxlines" ]; then git config hooks.emailmaxlines "$maxlines" fi && git config hooks.emailprefix "$prefix" && git config hooks.envelopesender noreply@sourceforge.net && git config hooks.mailinglist $MLIST@lists.sourceforge.net && exec git config hooks.showrev "t=%s; printf 'http://sourceforge.net/p/$PROJECTNAME/$REPONAME/ci/%%s' \$t; echo;echo; git show -C \$t; echo"