Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow download from a git repository
  • Loading branch information
Antoine Bertin committed Sep 29, 2012
1 parent fdc3e1e commit 8ad1089
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mk/spksrc.download.mk
Expand Up @@ -41,6 +41,21 @@ download_target: $(PRE_DOWNLOAD_TARGET)
@cd $(DISTRIB_DIR) && for url in $(URLS) ; \
do \
case "$(PKG_DOWNLOAD_METHOD)" in \
git) \
localFolder=$(NAME)-git$(PKG_GIT_HASH) ; \
localFile=$${localFolder}.tar.gz ; \
if [ ! -f $${localFile} ]; then \
rm -fr $${localFolder}.part ; \
echo "git clone $${url}" ; \
git clone --no-checkout --quiet $${url} $${localFolder}.part ; \
git --git-dir=$${localFolder}.part/.git --work-tree=$${localFolder}.part checkout --quiet $(PKG_GIT_HASH) ; \
mv $${localFolder}.part $${localFolder} ; \
tar --exclude-vcs -czf $${localFile} $${localFolder} ; \
rm -fr $${localFolder} ; \
else \
$(MSG) " File $${localFile} already downloaded" ; \
fi ; \
;; \
svn) \
if [ "$(PKG_SVN_REV)" = "HEAD" ]; then \
rev=`svn info --xml $${url} | xmllint --xpath 'string(/info/entry/@revision)' -` ; \
Expand Down

0 comments on commit 8ad1089

Please sign in to comment.