summaryrefslogtreecommitdiff
path: root/include/download.mk
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2010-03-14 21:55:11 +0000
committerTravis Kemen <thepeople@openwrt.org>2010-03-14 21:55:11 +0000
commitdb7082d8993e7d13335465547dfe990e0c1d5cc5 (patch)
tree71a05a8efbf3a6d4b82239b7865e92d75deb4edc /include/download.mk
parent1223494f1d1e64461b47330eb3a52e8abfd84891 (diff)
downloadmtk-20170518-db7082d8993e7d13335465547dfe990e0c1d5cc5.zip
mtk-20170518-db7082d8993e7d13335465547dfe990e0c1d5cc5.tar.gz
mtk-20170518-db7082d8993e7d13335465547dfe990e0c1d5cc5.tar.bz2
Updated post r19769, integrates the missing dl_method bzr hunk from #6370, uses the export subcommand for the vcs' that provide a usable version (hg archive doesn't work remotely, git archive isn't enabled on github), from #6700
SVN-Revision: 20222
Diffstat (limited to 'include/download.mk')
-rw-r--r--include/download.mk28
1 files changed, 16 insertions, 12 deletions
diff --git a/include/download.mk b/include/download.mk
index e19cd41..e0d743a 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -16,7 +16,9 @@ $(strip \
$(if $(filter svn://%,$(1)),svn, \
$(if $(filter cvs://%,$(1)),cvs, \
$(if $(filter hg://%,$(1)),hg, \
- unknown \
+ $(if $(filter sftp://%,$(1)),bzr, \
+ unknown \
+ ) \
) \
) \
) \
@@ -53,11 +55,11 @@ define DownloadMethod/cvs
cd $(TMP_DIR)/dl && \
rm -rf $(SUBDIR) && \
[ \! -d $(SUBDIR) ] && \
- cvs -d $(URL) co $(VERSION) $(SUBDIR) && \
- find $(SUBDIR) -name CVS | xargs rm -rf && \
+ cvs -d $(URL) export $(VERSION) $(SUBDIR) && \
echo "Packing checkout..." && \
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
- mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/; \
+ mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
+ rm -rf $(SUBDIR); \
)
endef
@@ -68,11 +70,11 @@ define DownloadMethod/svn
cd $(TMP_DIR)/dl && \
rm -rf $(SUBDIR) && \
[ \! -d $(SUBDIR) ] && \
- svn co --non-interactive -r$(VERSION) $(URL) $(SUBDIR) && \
- find $(SUBDIR) -name .svn | xargs rm -rf && \
+ svn export --non-interactive -r$(VERSION) $(URL) $(SUBDIR) && \
echo "Packing checkout..." && \
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
- mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/; \
+ mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
+ rm -rf $(SUBDIR); \
)
endef
@@ -88,7 +90,8 @@ define DownloadMethod/git
echo "Packing checkout..." && \
rm -rf $(SUBDIR)/.git && \
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
- mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/; \
+ mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
+ rm -rf $(SUBDIR); \
)
endef
@@ -99,11 +102,11 @@ define DownloadMethod/bzr
cd $(TMP_DIR)/dl && \
rm -rf $(SUBDIR) && \
[ \! -d $(SUBDIR) ] && \
- bzr co --lightweight -r$(VERSION) $(URL) $(SUBDIR) && \
- find $(SUBDIR) -name .bzr | xargs rm -rf && \
+ bzr export -r$(VERSION) $(URL) $(SUBDIR) && \
echo "Packing checkout..." && \
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
- mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/; \
+ mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ &&
+ rm -rf $(SUBDIR); \
)
endef
@@ -118,7 +121,8 @@ define DownloadMethod/hg
find $(SUBDIR) -name .hg | xargs rm -rf && \
echo "Packing checkout..." && \
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
- mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/; \
+ mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
+ rm -rf $(SUBDIR); \
)
endef