]> git.proxmox.com Git - pve-eslint.git/commitdiff
buildsys: prepare builddir atomically
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 23 May 2023 07:56:05 +0000 (09:56 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 May 2023 16:51:55 +0000 (18:51 +0200)
so an aborted build has no artifacts left over

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Makefile

index 20ac0aa6e1b421200166cd47f358042066caa2c4..e24e37aad1a38244ce5efb671656bc568deb9320 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,11 +20,12 @@ all: $(DEB)
 
 $(BUILDDIR): builddir
 builddir: $(SRCDIR)
-       rm -rf $(BUILDDIR)
-       mkdir $(BUILDDIR)
-       cp -a debian $(BUILDDIR)/
-       cp -a $(SRCDIR)/* $(BUILDDIR)/
-       echo "git clone git://git.proxmox.com/git/pve-eslint.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
+       rm -rf $(BUILDDIR).tmp $(BUILDDIR)
+       mkdir $(BUILDDIR).tmp
+       cp -a debian $(BUILDDIR).tmp/
+       cp -a $(SRCDIR)/* $(BUILDDIR).tmp/
+       echo "git clone git://git.proxmox.com/git/pve-eslint.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
+       mv $(BUILDDIR).tmp $(BUILDDIR)
 
 
 dsc: $(DSC)