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