tool/depot: replace wget by curl to support file:// URLs

File-scheme URLs permit users to host downloadable archives (which may
be sync'd by other means beforehand) on the local file system.

Fixes #4737
This commit is contained in:
Christian Helmuth 2023-01-23 09:01:29 +01:00
parent 07d02f8d46
commit da673cfad7

View File

@ -110,7 +110,7 @@ file_url = '${URL($(call archive_user,$1))}/$1'
$(PUBLIC_DIR)/%: $(PUBLIC_DIR)/%:
@$(ECHO) "$(DARK_COL)download$(DEFAULT_COL) $*" @$(ECHO) "$(DARK_COL)download$(DEFAULT_COL) $*"
$(VERBOSE)mkdir -p $(dir $@) $(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)wget --quiet --no-check-certificate $(call file_url,$*) -O $@ ||\ $(VERBOSE)curl --silent $(call file_url,$*) -o $@ ||\
(echo "Error: failed to download $(call file_url,$*)"; rm -f $@; false) (echo "Error: failed to download $(call file_url,$*)"; rm -f $@; false)
$(MAKECMDGOALS): $(TARGETS) $(MAKECMDGOALS): $(TARGETS)