From 8795ab3c8b3bbaad19d2764c86b9892f5deddae4 Mon Sep 17 00:00:00 2001 From: Ismael Luceno Date: Wed, 29 Dec 2010 05:32:10 -0200 Subject: Move bzr_download function to it's own file, so it can be shared and fix emacs download for tarball releases --- bzr_download.function | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 bzr_download.function (limited to 'bzr_download.function') diff --git a/bzr_download.function b/bzr_download.function new file mode 100644 index 0000000000..ebfac4653f --- /dev/null +++ b/bzr_download.function @@ -0,0 +1,23 @@ +#--------------------------------------------------------------------- +## Handler for downloading from bzr URLs +#--------------------------------------------------------------------- +function bzr_download() { + if [ $SOURCE_CACHE/$SOURCE ] + then + message "${MESSAGE_COLOR}Unpacking the source...${DEFAULT_COLOR}" && + tar xjf $SOURCE_CACHE/$SOURCE && + cd $SOURCE_DIRECTORY && + message "${MESSAGE_COLOR}Updating...${DEFAULT_COLOR}" && + echo bzr update && + bzr update && + 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 + fi && + + message "${MESSAGE_COLOR}Repacking the source...${DEFAULT_COLOR}" && + tar cjf $SOURCE $SOURCE_DIRECTORY && + mv $SOURCE $SOURCE_CACHE +} -- cgit v1.2.3