From 94fea8c0e6ba8cea67d69dd0e49142811bba1611 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 4 Jun 2017 23:54:51 +0200 Subject: [PATCH] tools: preserve make errors, ignore empty output Exit codes lost since commit v1.9-305-ga7e3d17ab8 (2017-05-29) [tools: atomic creation of include files]. Fixed using `mispipe` also provided by moreutils. As additional fail-safe, also catch empty results with `ifne` to keep existing data on failure. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fb804a8..85fc990 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInf .PHONY: download # atomically create file by command -cmdsave = @echo $1 $2 \>$@; $1 $2 | sponge $@ +cmdsave = @echo $1 $2 \>$@; mispipe '$1 $2' 'ifne sponge $@' # download git checkout gitsave = @if cd $@ 2>/dev/null; \ then echo git pull $@; git pull -q --ff-only || true; \ -- 2.30.0