diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2016-01-12 09:25:45 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2016-01-12 09:25:45 +0000 |
commit | 2224dbdb9de293497f8e6a56b5a587b54c8d9d97 (patch) | |
tree | d64e8ef78fe91e120e957e8a039dba79b43075b7 | |
parent | b809725eb185c00c14e34d8e4e9d5c4d30a5a985 (diff) | |
download | upstream-2224dbdb9de293497f8e6a56b5a587b54c8d9d97.tar.gz upstream-2224dbdb9de293497f8e6a56b5a587b54c8d9d97.tar.bz2 upstream-2224dbdb9de293497f8e6a56b5a587b54c8d9d97.zip |
sdk: add base repository fallback
When the build system cannot infer its own repository url then let it fall
back to http://git.openwrt.org/ for the base feed.
The path to openwrt.git is guessed from the VERSION_NUMBER variable:
"unknown" or "r12345" -> http://git.openwrt.org/openwrt.git
"15.05.1" -> http://git.openwrt.org/15.05/openwrt.git
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 48212
-rw-r--r-- | target/sdk/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/sdk/Makefile b/target/sdk/Makefile index d0d113de90..857a6b76f5 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -37,6 +37,7 @@ SDK_DIRS = \ BASE_FEED:=$(shell git config --get remote.origin.url 2>/dev/null | sed -ne 's/^/src-git base /p') BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C git svn info 2>/dev/null | sed -ne 's/^URL: /src-gitsvn base /p')) BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C svn info 2>/dev/null | sed -ne 's/^URL: /src-svn base /p')) +BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git base https://git.openwrt.org/$(filter-out unknown/ r%/,$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(VERSION_NUMBER))))/)openwrt.git) KDIR_BASE = $(patsubst $(TOPDIR)/%,%,$(LINUX_DIR)) |