aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2018-06-28 18:27:27 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2018-07-05 01:30:57 +0800
commit04b9f8587370f96366c6e53fb411473279ba7c02 (patch)
treee94957b40825486a70c170db1fbae225cff9307b /include
parente48ea13b3bac5393d6400156ddb066ec5de2ea4e (diff)
downloadupstream-04b9f8587370f96366c6e53fb411473279ba7c02.tar.gz
upstream-04b9f8587370f96366c6e53fb411473279ba7c02.tar.bz2
upstream-04b9f8587370f96366c6e53fb411473279ba7c02.zip
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 <yszhou4tech@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/download.mk14
1 files changed, 7 insertions, 7 deletions
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 && \