mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-05 17:37:43 +00:00
pkg-download.mk: support detection of URI schemes in DOWNLOAD
When using one of the package infrastructures, the DOWNLOAD function uses $(PKG)_SITE_METHOD to determine the appropriate download method, which is autodetected based on the URI if none was explicitly set. When the DOWNLOAD function is called directly, for example when downloading a toolchain, or from a package that does not use one of the package infrastructures, the SITE_METHOD is not autodetected, and thus the download defaults to wget. This patch adds URI scheme detection directly to the DOWNLOAD method, in case no SITE_METHOD was detected yet. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
d57669271d
commit
77e2697218
@ -214,7 +214,12 @@ define DOWNLOAD_INNER
|
|||||||
esac ; \
|
esac ; \
|
||||||
fi ; \
|
fi ; \
|
||||||
if test -n "$(1)" ; then \
|
if test -n "$(1)" ; then \
|
||||||
case "$($(PKG)_SITE_METHOD)" in \
|
if test -z "$($(PKG)_SITE_METHOD)" ; then \
|
||||||
|
scheme="$(call geturischeme,$(1))" ; \
|
||||||
|
else \
|
||||||
|
scheme="$($(PKG)_SITE_METHOD)" ; \
|
||||||
|
fi ; \
|
||||||
|
case "$$scheme" in \
|
||||||
git) $($(DL_MODE)_GIT) && exit ;; \
|
git) $($(DL_MODE)_GIT) && exit ;; \
|
||||||
svn) $($(DL_MODE)_SVN) && exit ;; \
|
svn) $($(DL_MODE)_SVN) && exit ;; \
|
||||||
bzr) $($(DL_MODE)_BZR) && exit ;; \
|
bzr) $($(DL_MODE)_BZR) && exit ;; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user