]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
buildsys: make build-dir generation atomic
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 May 2023 17:24:59 +0000 (19:24 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 May 2023 17:26:27 +0000 (19:26 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index 0bf36cd5b848f555ce42b9e9f0b30b0bddad88dd..cce63bf2780d7c10ef8d869a07ee5eefa10d55b9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,9 +17,11 @@ SIMDSC=$(SIMPACKAGE)_$(DEB_VERSION).dsc
 all: deb
 
 $(BUILDDIR):
-       rm -rf $(BUILDDIR)
-       rsync -a src/ debian $(BUILDDIR)
-       echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
+       rm -rf $@ $@.tmp
+       cp -a src/ $@.tmp
+       cp -a debian $@.tmp/
+       echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
+       mv $@.tmp $@
 
 .PHONY: dinstall
 dinstall: $(DEB) $(SIMDEB)