mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
projects-dir.mk: Support CLONE_FROM_USER, PROJECTS
Add support for environment variables CLONE_FROM_USER and PROJECTS. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
80a2f85490
commit
e49351a515
1 changed files with 16 additions and 8 deletions
|
|
@ -1,14 +1,22 @@
|
|||
ifneq ($(PROJECTS),)
|
||||
export PGIT_CLONE_PROJECTS = $(PROJECTS)
|
||||
endif
|
||||
|
||||
ifneq ($(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)
|
||||
else
|
||||
PROJECTS = $(dir $(wildcard */CVS */.git))
|
||||
CVS_PROJECTS = $(dir $(wildcard */CVS))
|
||||
PROJECTS ?= $(dir $(wildcard */CVS */.git))
|
||||
CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS))
|
||||
endif
|
||||
|
||||
WHOAMI = $(shell id -un)
|
||||
RGIT = /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))
|
||||
|
||||
all:
|
||||
for p in $(PROJECTS); do make -C $$p || break; done
|
||||
|
|
@ -24,22 +32,22 @@ cpp:
|
|||
done
|
||||
|
||||
clone diff commit push:
|
||||
$(RGIT) $@
|
||||
$(PGIT) $@
|
||||
|
||||
git-push:
|
||||
$(RGIT) push
|
||||
$(PGIT) push
|
||||
|
||||
update pull:
|
||||
cvs update -dP $(CVS_PROJECTS)
|
||||
$(RGIT) pull
|
||||
$(PGIT) pull
|
||||
|
||||
git-pull:
|
||||
$(RGIT) pull
|
||||
$(PGIT) pull
|
||||
|
||||
status:
|
||||
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
|
||||
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
|
||||
$(RGIT) status
|
||||
$(PGIT) status
|
||||
|
||||
git-conv-%:
|
||||
mv $* old/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue