mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 20:13:32 +01:00
projects-dir.mk: Add support for JANWARE_USER
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
d32928cd4f
commit
3ba891676d
1 changed files with 24 additions and 9 deletions
|
|
@ -17,23 +17,36 @@ define newline
|
|||
endef
|
||||
|
||||
ifneq ($(PROJECTS),)
|
||||
export PGIT_CLONE_PROJECTS = $(PROJECTS)
|
||||
export PGIT_CLONE_PROJECTS = $(PROJECTS)
|
||||
endif
|
||||
|
||||
ifneq ($(CLONE_FROM_USER),)
|
||||
export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER)
|
||||
export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard projects.txt),)
|
||||
PROJECTS = $(shell cat projects.txt | sed '/^ *\#/ d')
|
||||
# TODO: this could be nicer
|
||||
CVS_PROJECTS = $(PROJECTS)
|
||||
PROJECTS = $(shell cat projects.txt | sed '/^ *\#/ d')
|
||||
# TODO: this could be nicer
|
||||
CVS_PROJECTS = $(PROJECTS)
|
||||
else
|
||||
PROJECTS ?= $(shell ls -d */CVS */.git 2>/dev/null | sed 's%/[^/]*%%')
|
||||
CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS))
|
||||
PROJECTS ?= $(shell ls -d */CVS */.git 2>/dev/null | sed 's%/[^/]*%%')
|
||||
CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS))
|
||||
endif
|
||||
|
||||
WHOAMI = $(shell id -un)
|
||||
ifeq ($(JANWARE_USER),)
|
||||
WHOAMI = $(shell id -un)
|
||||
else
|
||||
WHOAMI = $(JANWARE_USER)
|
||||
endif
|
||||
|
||||
ifeq ($(CVSROOT),)
|
||||
CVSROOT = :ext:$(WHOAMI)@cvs.jannet.de:/home/jannet/arc/cvs
|
||||
export CVSROOT
|
||||
endif
|
||||
|
||||
CVS_RSH = ssh
|
||||
export CVS_RSH
|
||||
|
||||
PGIT = CLONE_PROJECTS="$(PROJECTS)" CLONE_FROM_USER="$(shell whoami)" /bin/bash $(firstword $(wildcard ./ytools/devutil/scripts/pgit.sh /opt/ytools/bin/pgit.sh))
|
||||
|
||||
EXCLUDE_FROM_BUILD = \
|
||||
|
|
@ -121,6 +134,8 @@ cvsdir.done:
|
|||
if [ ! -d CVS ]; then \
|
||||
echo -e '$(subst $(newline),\n,${CVSDIR_MIME})' | tee /tmp/test.mime | mimencode -u | tar -xjf - ;\
|
||||
fi
|
||||
sed -i "s/.*@cvs.jannet.de/$(shell id -un)@cvs.jannet.de/" CVS/Root
|
||||
if grep -q "^jan@cvs.jannet.de/" CVS/Root; then \
|
||||
echo $(CVSROOT) > CVS/Root ;\
|
||||
fi
|
||||
touch $@
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue