debug: bundle
This commit is contained in:
parent
1e3ecf5bc6
commit
b5cd4af457
1 changed files with 13 additions and 6 deletions
19
Makefile
19
Makefile
|
|
@ -18,13 +18,20 @@ check-dom0 = $(error this target must be run in dom0)
|
|||
check-domu = @true
|
||||
endif
|
||||
|
||||
BUNDLEOUT := .bundles/dom0.bundle
|
||||
BUNDLEIN := .bundles/domu.bundle
|
||||
BUNDLEIN := .bundles/qubes-mgmt-salt
|
||||
|
||||
clean-workdir = git init -q -b $* && git diff --quiet && git diff --cached --quiet || (echo 'dirty tree; check git status' && false)
|
||||
|
||||
create-bundle = git show-ref --verify --quiet refs/remotes/$(1)/$* \
|
||||
|| git bundle create $(BUNDLEOUT) $(1)/$*
|
||||
.PHONY: guard-domu
|
||||
guard-domu:
|
||||
@ if [ "`hostname`" != "`qubesdb-read /name`" ]; then \
|
||||
echo "This task must be run in a guest domain"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
create-bundle: guard-domu
|
||||
mkdir -p .bundles
|
||||
git bundle create - --all > .bundles/qubes-mgmt-salt
|
||||
|
||||
.PHONY: pull pull/%
|
||||
pull: pull/$(shell git branch --show-current)
|
||||
|
|
@ -35,9 +42,9 @@ pull/%:
|
|||
$(clean-workdir)
|
||||
|
||||
echo "creating bundle"
|
||||
qvm-run -p $(GUEST) "cd $(GUEST_REPO) && $(call create-bundle,dom0)" </dev/null
|
||||
qvm-run -p $(GUEST) "cd $(GUEST_REPO) && $(call create-bundle)" </dev/null
|
||||
|
||||
qvm-run -p $(GUEST) "cat $(GUEST_REPO)/$(BUNDLEIN)" </dev/null >$(BUNDLEIN)
|
||||
qvm-run -p $(GUEST) "cat $(GUEST_REPO)/qubes-mgmt-salt" </dev/null >$(BUNDLEIN)
|
||||
|
||||
git remote add $(GUEST) $(BUNDLEIN) || true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue