mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
git-srv-admin.sh: Add stub command list-maintainers
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
226fcc8cc3
commit
f7ac54013e
1 changed files with 21 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ usage()
|
|||
|
|
||||
| create-repo name
|
||||
| list-repos
|
||||
| list-maintainers
|
||||
|
|
||||
EOT
|
||||
[ "$1" ] && exit $1
|
||||
|
|
@ -101,6 +102,23 @@ list_repos()
|
|||
return $?
|
||||
}
|
||||
|
||||
list_maintainers()
|
||||
{
|
||||
local dev_chief=jan
|
||||
local master_dir=/srv/git/$dev_chief/proj
|
||||
local d pdir p val
|
||||
|
||||
for d in $master_dir; do
|
||||
for pdir in `find $d -maxdepth 1 -mindepth 1 -type d`; do
|
||||
#echo "$d -> $pdir"
|
||||
p=`basename $pdir`
|
||||
val=`git -C $pdir show HEAD:make/project.conf 2>/dev/null | sed -n '/^\[global\]/,/^\[/ p' | sed '/group/ !d; s/.*= *//'`
|
||||
[ "$val" ] || continue
|
||||
echo "$p $val"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# ----------------- here we go
|
||||
no_error_if_exists=0
|
||||
id=`whoami`
|
||||
|
|
@ -170,6 +188,9 @@ create-project-dir|create-repo-dir)
|
|||
check_user_is_self
|
||||
create_repo_dir "$@"
|
||||
;;
|
||||
list-maintainers|maintainers)
|
||||
list_maintainers
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue