X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=configure-sf;h=fb381252266777f701e8a4fb4b64fe1ab01ddfd1;hb=02d75d1ae286b7ba26638ff42fd86491b4e99265;hp=aa4a1c978e8efe73976a717e89c50e47ad53123b;hpb=bf0819a6a1af49727782d06ad192e7edc541d6b5;p=git-scripts.git diff --git a/configure-sf b/configure-sf index aa4a1c9..fb38125 100755 --- a/configure-sf +++ b/configure-sf @@ -1,7 +1,9 @@ #! /bin/sh +# Origin: http://blog.gorwits.me.uk/index.html%3Fp=529.html + if [ -z "$3" ]; then - echo "Usage: $0 PROJECTNAME REPONAME MLIST [prefix]" >&2 + echo "Usage: $0 PROJECTNAME REPONAME MLIST [prefix [maxlines]]" >&2 exit 1 fi @@ -9,6 +11,7 @@ PROJECTNAME="$1" REPONAME="$2" MLIST="$3" prefix="$4" +maxlines="$5" cd /home/git/p/"$PROJECTNAME/$REPONAME".git && echo "$PROJECTNAME git repository ($REPONAME)" > description @@ -21,10 +24,12 @@ chmod +x hooks/post-receive-user && #chmod g+w hooks/post-receive-user && git config hooks.diffopts "--stat --summary --find-copies-harder -p" -git config hooks.emailmaxlines 500 && +if [ -n "$maxlines" ]; then + git config hooks.emailmaxlines "$maxlines" && +fi && if [ -n "$prefix" ]; then git config hooks.emailprefix "$prefix" fi && git config hooks.envelopesender noreply@sourceforge.net && git config hooks.mailinglist $MLIST@lists.sourceforge.net -#git config hooks.showrev "t=%s; printf 'http://$PROJECTNAME.git.sourceforge.net/git/gitweb.cgi?p=$PROJECTNAME/$REPONAME;a=commitdiff;h=%%s' ; echo;echo; git show -C ; echo" +#git config hooks.showrev "t=%s; printf 'http://$PROJECTNAME.git.sourceforge.net/git/gitweb.cgi?p=$PROJECTNAME/$REPONAME;a=commitdiff;h=%%s' \$t; echo;echo; git show -C \$t; echo"