[vlc-devel] [PATCH] tools: don't keep files that failed to download

Steve Lhomme robux4 at videolabs.io
Tue Feb 9 17:45:44 CET 2016


---
 extras/tools/tools.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 69a8d2d..c1b1a91 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -12,7 +12,7 @@ AUTOCONF=$(PREFIX)/bin/autoconf
 export AUTOCONF
 
 ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
-download = curl -f -L -- "$(1)" > "$@"
+download = curl -f -L -- "$(1)" > "$@" || (rm -f "$@" && exit 1)
 else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
 download = rm -f $@.tmp && \
 	wget --passive -c -p -O $@.tmp "$(1)" && \
-- 
2.7.0



More information about the vlc-devel mailing list