From: Felix Fietkau Date: Sun, 2 Oct 2016 09:40:06 +0000 (+0200) Subject: build: leaving behind incomplete metadata files on cancelled builds X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=934901fb3e544e3c3ef66f6695bcf41293843bf3;p=librecmc%2Flibrecmc.git build: leaving behind incomplete metadata files on cancelled builds Signed-off-by: Felix Fietkau --- diff --git a/include/scan.mk b/include/scan.mk index 5af035972f..5bb263d713 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -40,7 +40,8 @@ define PackageDir rm -f $$@; \ }; \ echo; \ - } > $$@ || true + } > $$@.tmp + mv $$@.tmp $$@ endef $(OVERRIDELIST): @@ -76,7 +77,8 @@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) print "$$(eval $$(call PackageDir," info "," dir "," pkg "))"; \ } ' < $<; \ true; \ - ) > $@ + ) > $@.tmp + mv $@.tmp $@ -include $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk