2010-04-24 19:30:38 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# please make sure this file is NOT chmod +x
|
|
|
|
|
|
|
|
die() { echo "$@"; exit 1; }
|
|
|
|
|
|
|
|
get_rights_and_owner() {
|
|
|
|
local ans
|
2010-05-31 17:09:45 +02:00
|
|
|
ans=$(perl -I$GL_BINDIR -Mgitolite -e 'cli_repo_rights("'$1'")')
|
2010-04-24 19:30:38 +02:00
|
|
|
|
|
|
|
# set shell variables as needed
|
|
|
|
owner=${ans#* }
|
|
|
|
rights=${ans% *}
|
|
|
|
[[ $rights =~ C ]] && perm_create=yes || perm_create=
|
|
|
|
[[ $rights =~ R ]] && perm_read=yes || perm_read=
|
|
|
|
[[ $rights =~ W ]] && perm_write=yes || perm_write=
|
|
|
|
}
|