summaryrefslogtreecommitdiffstats
path: root/bzr_download.function
diff options
context:
space:
mode:
Diffstat (limited to 'bzr_download.function')
-rw-r--r--bzr_download.function23
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
+}