mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
pgit.sh: Add distinction between CLONE_FROM_USER and PGIT_LOGIN
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
564b45ce8c
commit
0e52bbcc42
1 changed files with 6 additions and 4 deletions
|
|
@ -53,11 +53,13 @@ clone()
|
|||
local p
|
||||
config
|
||||
cd $pdir
|
||||
local id=$PGIT_CLONE_FROM_USER
|
||||
local fromuser=$PGIT_CLONE_FROM_USER
|
||||
local login=$PGIT_LOGIN
|
||||
local projects="$PGIT_CLONE_PROJECTS"
|
||||
[ "$id" ] || id=`whoami`
|
||||
[ "$login" ] || login=`whoami`
|
||||
[ "$fromuser" ] || fromuser=`whoami`
|
||||
if [ -z "$projects" ]; then
|
||||
projects=`$SSH git.jannet.de /opt/ytools/bin/git-srv-admin.sh -u $id -j list-personal-projects`
|
||||
projects=`$SSH git.jannet.de /opt/ytools/bin/git-srv-admin.sh -u $fromuser -j list-personal-projects`
|
||||
[ "$?" != 0 ] && exit 1
|
||||
fi
|
||||
set -e
|
||||
|
|
@ -67,7 +69,7 @@ clone()
|
|||
continue
|
||||
}
|
||||
marker "cloning $p"
|
||||
git clone ssh://$id@git.jannet.de/srv/git/$id/proj/$p
|
||||
git clone ssh://$login@git.jannet.de/srv/git/$fromuser/proj/$p
|
||||
git -C $p submodule init || fatal git submodule init failed in `pwd`
|
||||
git -C $p submodule update || fatal git submodule update failed in `pwd`
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue