From 04b9f8587370f96366c6e53fb411473279ba7c02 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Thu, 28 Jun 2018 18:27:27 +0800 Subject: scripts/dl_github_archive.py: rename from download.py - Make the code more GitHub-specific - Requires mirror hash to work with .gitattributes - Use different API depending on whether PKG_SOURCE_VERSION is a complete commit id or other ref types like tags - Fix removing symbolic link - pre-clean dir_untar for possible leftovers from previous run Signed-off-by: Yousong Zhou --- include/download.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/download.mk b/include/download.mk index 5cfc542042..1627b4fdfb 100644 --- a/include/download.mk +++ b/include/download.mk @@ -172,25 +172,25 @@ endef define DownloadMethod/git $(call wrap_mirror,$(1),$(2), \ - $(call DownloadMethod/git-raw) \ + $(call DownloadMethod/rawgit) \ ) endef -define DownloadMethod/github-tarball +define DownloadMethod/github_archive $(call wrap_mirror,$(1),$(2), \ - $(SCRIPT_DIR)/download.py dl \ + $(SCRIPT_DIR)/dl_github_archive.py \ --dl-dir="$(DL_DIR)" \ - --url $(foreach url,$(URL),"$(url)") \ - --proto="$(PROTO)" \ + --url="$(URL)" \ --version="$(VERSION)" \ --subdir="$(SUBDIR)" \ --source="$(FILE)" \ - || ( $(call DownloadMethod/git-raw) ); \ + --hash="$(MIRROR_HASH)" \ + || ( $(call DownloadMethod/rawgit) ); \ ) endef # Only intends to be called as a submethod from other DownloadMethod -define DownloadMethod/git-raw +define DownloadMethod/rawgit echo "Checking out files from the git repository..."; \ mkdir -p $(TMP_DIR)/dl && \ cd $(TMP_DIR)/dl && \ -- cgit v1.2.3