mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
download.mk: enable DownloadMethod/github_archive
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
parent
04b9f85873
commit
9009efa18b
@ -19,17 +19,23 @@ endif
|
|||||||
|
|
||||||
DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
|
DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
|
||||||
|
|
||||||
|
define dl_method_git
|
||||||
|
$(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git)
|
||||||
|
endef
|
||||||
|
|
||||||
# Try to guess the download method from the URL
|
# Try to guess the download method from the URL
|
||||||
define dl_method
|
define dl_method
|
||||||
$(strip \
|
$(strip \
|
||||||
$(if $(2),$(2), \
|
$(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
|
||||||
$(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
|
$(if $(2),$(2), \
|
||||||
$(if $(filter git://%,$(1)),git, \
|
$(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
|
||||||
$(if $(filter svn://%,$(1)),svn, \
|
$(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
|
||||||
$(if $(filter cvs://%,$(1)),cvs, \
|
$(if $(filter svn://%,$(1)),svn, \
|
||||||
$(if $(filter hg://%,$(1)),hg, \
|
$(if $(filter cvs://%,$(1)),cvs, \
|
||||||
$(if $(filter sftp://%,$(1)),bzr, \
|
$(if $(filter hg://%,$(1)),hg, \
|
||||||
unknown \
|
$(if $(filter sftp://%,$(1)),bzr, \
|
||||||
|
unknown \
|
||||||
|
) \
|
||||||
) \
|
) \
|
||||||
) \
|
) \
|
||||||
) \
|
) \
|
||||||
|
Loading…
Reference in New Issue
Block a user