blob: 7d2a3a3723808c14042f3a771b6fbe765b6fba21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# Usage: ssh git@host create <repo>
#
# Create wild repo.
die() { echo "$@" >&2; exit 1; }
usage() { perl -lne 'print substr($_, 2) if /^# Usage/../^$/' < $0; exit 1; }
[ -z "$1" ] && usage
[ -z "$2" ] || usage
[ "$1" = "-h" ] && usage
[ -z "$GL_USER" ] && die GL_USER not set
# ----------------------------------------------------------------------
gitolite git-config -r $1 gitolite-options.default.roles | sort | cut -f3 |
perl -pe 's/(\s)CREATOR(\s|$)/$1$ENV{GL_USER}$1/' | $GL_BINDIR/commands/perms -c "$@"
|