From e2ba640b952ff55231156ee0cbce9e601aff4d83 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 23 May 2023 09:56:05 +0200 Subject: [PATCH] buildsys: prepare builddir atomically so an aborted build has no artifacts left over Signed-off-by: Dominik Csapak --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 20ac0aa..e24e37a 100644 --- 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) -- 2.39.2