[vlc-devel] [PATCH] contrib: remove empty file on download fail

Thomas Guillem thomas at gllm.fr
Wed Aug 26 13:57:46 CEST 2020


This fixes package not downloaded again in case of a first failure.

The other download rules (wget, fetch) are already following this behavior on
fail.
---
 contrib/src/main.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index d0df860a954..40be8723e3e 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -247,7 +247,7 @@ endif
 SVN ?= $(error subversion client (svn) not found)
 
 ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
-download = curl -f -L -- "$(1)" > "$@"
+download = (curl -f -L -- "$(1)" > $@.tmp && touch $@.tmp && mv $@.tmp $@ )
 else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
 download = (rm -f $@.tmp && \
 	wget --passive -c -p -O $@.tmp "$(1)" && \
-- 
2.28.0



More information about the vlc-devel mailing list