diff options
author | Ismael Luceno | 2010-12-29 05:32:10 -0200 |
---|---|---|
committer | Ismael Luceno | 2010-12-29 05:32:10 -0200 |
commit | 8795ab3c8b3bbaad19d2764c86b9892f5deddae4 (patch) | |
tree | 3ce1e9bd4ff9868cace4726d3f73dac9722028bf /bzr_download.function | |
parent | 440112bb38fc6017f7ac24c8f9ab92d42316ab3b (diff) |
Move bzr_download function to it's own file, so it can be shared
and fix emacs download for tarball releases
Diffstat (limited to 'bzr_download.function')
-rw-r--r-- | bzr_download.function | 23 |
1 files changed, 23 insertions, 0 deletions
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 +} |