mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-27 23:43:54 +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
|
endef
|
||||||
|
|
||||||
ifneq ($(PROJECTS),)
|
ifneq ($(PROJECTS),)
|
||||||
export PGIT_CLONE_PROJECTS = $(PROJECTS)
|
export PGIT_CLONE_PROJECTS = $(PROJECTS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CLONE_FROM_USER),)
|
ifneq ($(CLONE_FROM_USER),)
|
||||||
export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER)
|
export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard projects.txt),)
|
ifneq ($(wildcard projects.txt),)
|
||||||
PROJECTS = $(shell cat projects.txt | sed '/^ *\#/ d')
|
PROJECTS = $(shell cat projects.txt | sed '/^ *\#/ d')
|
||||||
# TODO: this could be nicer
|
# TODO: this could be nicer
|
||||||
CVS_PROJECTS = $(PROJECTS)
|
CVS_PROJECTS = $(PROJECTS)
|
||||||
else
|
else
|
||||||
PROJECTS ?= $(shell ls -d */CVS */.git 2>/dev/null | sed 's%/[^/]*%%')
|
PROJECTS ?= $(shell ls -d */CVS */.git 2>/dev/null | sed 's%/[^/]*%%')
|
||||||
CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS))
|
CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS))
|
||||||
endif
|
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))
|
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 = \
|
EXCLUDE_FROM_BUILD = \
|
||||||
|
|
@ -121,6 +134,8 @@ cvsdir.done:
|
||||||
if [ ! -d CVS ]; then \
|
if [ ! -d CVS ]; then \
|
||||||
echo -e '$(subst $(newline),\n,${CVSDIR_MIME})' | tee /tmp/test.mime | mimencode -u | tar -xjf - ;\
|
echo -e '$(subst $(newline),\n,${CVSDIR_MIME})' | tee /tmp/test.mime | mimencode -u | tar -xjf - ;\
|
||||||
fi
|
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 $@
|
touch $@
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue