]> git.proxmox.com Git - pve-zsync.git/commitdiff
buildsys: create build directory atomically
authorFiona Ebner <f.ebner@proxmox.com>
Wed, 24 May 2023 11:44:06 +0000 (13:44 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Wed, 24 May 2023 11:44:54 +0000 (13:44 +0200)
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Makefile

index 79c02063f563ce411dc9c12c4b08336b712f5ef0..378d8bfe7ca6ab30268f38a16fcea4489f0eb252 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,9 +34,10 @@ install: pve-zsync.8
        install -d $(DOCDIR)
 
 $(BUILDDIR):
-       rm -rf $(BUILDDIR)
-       rsync -a * $(BUILDDIR)
-       echo "git clone git://git.proxmox.com/git/dab.git\\ngit checkout $(GITVERSION)" >  $(BUILDDIR)/debian/SOURCE
+       rm -rf $@.tmp $@
+       rsync -a * $@.tmp
+       echo "git clone git://git.proxmox.com/git/dab.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
+       mv $@.tmp $@
 
 .PHONY: deb
 deb: $(DEB)