From 1bdde4cc73e8de5f49e7564b79dc28a34dc40c0f Mon Sep 17 00:00:00 2001 From: Ismael Luceno Date: Mon, 25 Apr 2011 23:59:16 -0300 Subject: Add support for bzr_http and fix depending spells To fix downloads from Launchpad, which doesn't support bzr protocol. --- bzr_download.function | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bzr_download.function') diff --git a/bzr_download.function b/bzr_download.function index a0886308e7..86d79180ca 100755 --- a/bzr_download.function +++ b/bzr_download.function @@ -2,6 +2,9 @@ ## Handler for downloading from bzr URLs #--------------------------------------------------------------------- function bzr_download() { + local URL="${SOURCE_URL%:*}" + URL="${URL#bzr_}" + if file_exists $SOURCE_CACHE/$SOURCE then message "${MESSAGE_COLOR}Unpacking the source...${DEFAULT_COLOR}" && @@ -13,8 +16,8 @@ function bzr_download() { cd - else message "${MESSAGE_COLOR}Doing a lightweight checkout...${DEFAULT_COLOR}" && - echo bzr checkout --lightweight ${SOURCE_URL%:*} $SOURCE_DIRECTORY && - bzr checkout --lightweight ${SOURCE_URL%:*} $SOURCE_DIRECTORY + echo bzr checkout --lightweight "$URL" "$SOURCE_DIRECTORY" && + bzr checkout --lightweight "$URL" "$SOURCE_DIRECTORY" fi && message "${MESSAGE_COLOR}Repacking the source...${DEFAULT_COLOR}" && -- cgit v1.2.3