finish script to create svn or trac repo
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
e7708f2d66
commit
508ac10f25
|
@ -19,13 +19,15 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ $# -ne 2 ]; then
|
if [ $# -lt 3 ]; then
|
||||||
cat << eof
|
cat << eof
|
||||||
$0: <ml-name> <ml-owner-email>
|
$0: <repo-name> <repo-admin> <trac|notrac> [comments]
|
||||||
|
|
||||||
|
trac: Also create a trac instance for the svn repo.
|
||||||
|
|
||||||
Requires NETHZ_USERNAME to be set.
|
Requires NETHZ_USERNAME to be set.
|
||||||
|
|
||||||
Example: NETHZ_USERNAME="nicosc" $0 example example@ethz.ch
|
Example: NETHZ_USERNAME="nicosc" $0 coolcode troscoe trac Add write permissions for group xyz
|
||||||
|
|
||||||
eof
|
eof
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -38,28 +40,29 @@ fi
|
||||||
|
|
||||||
sendmail="/usr/sbin/sendmail"
|
sendmail="/usr/sbin/sendmail"
|
||||||
to="support@inf.ethz.ch systems-sysadmins@lists.inf.ethz.ch"
|
to="support@inf.ethz.ch systems-sysadmins@lists.inf.ethz.ch"
|
||||||
|
to="nicosc@ethz.ch"
|
||||||
from="${NETHZ_USERNAME}@ethz.ch"
|
from="${NETHZ_USERNAME}@ethz.ch"
|
||||||
|
|
||||||
mlname="$1"; shift
|
reponame="$1"; shift
|
||||||
mlowner="$1"; shift
|
repoowner="$1"; shift
|
||||||
|
trac="$1"; shift
|
||||||
|
|
||||||
dirname="$(echo $sharename | awk -F- '{ print $2 "/" $3 }')"
|
if [ "$trac" = trac ]; then
|
||||||
|
tracflag="on"
|
||||||
|
else
|
||||||
|
tracflag="off"
|
||||||
|
fi
|
||||||
|
|
||||||
cat << eof | $sendmail -f "$from" $to
|
cat << eof | $sendmail -f "$from" $to
|
||||||
To: support@inf.ethz.ch, systems-sysadmins@lists.inf.ethz.ch
|
To: support@inf.ethz.ch, systems-sysadmins@lists.inf.ethz.ch
|
||||||
Subject: New mailing list: $mlname
|
Subject: Request for new svn repo $reponame for OU Systems
|
||||||
|
|
||||||
Dear ISG,
|
Comments: $@
|
||||||
|
Repository admin: $repoowner
|
||||||
can you create the new mailinglist
|
Repository name: $reponame
|
||||||
|
With Trac: $tracflag
|
||||||
${mlname}@lists.inf.ethz.ch
|
eMail address: $from
|
||||||
|
group: Systems
|
||||||
with
|
|
||||||
|
|
||||||
$mlowner
|
|
||||||
|
|
||||||
as owner?
|
|
||||||
|
|
||||||
Cheers,
|
Cheers,
|
||||||
|
|
Loading…
Reference in New Issue