summaryrefslogtreecommitdiff
path: root/scripts/build/lb_source_tar
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-01-02 00:36:20 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:40 +0100
commit21815cb707e78ed1899c74c09503cc5b696383e6 (patch)
tree9d2bdd949f2e5e08556b6570316d99cb15910550 /scripts/build/lb_source_tar
parent8c19e13179e0bb298adb28d84fb778a717be1fad (diff)
downloadvyos-live-build-21815cb707e78ed1899c74c09503cc5b696383e6.tar.gz
vyos-live-build-21815cb707e78ed1899c74c09503cc5b696383e6.zip
Generalizing compression handling and adding support for lzip tarballs.
Diffstat (limited to 'scripts/build/lb_source_tar')
-rwxr-xr-xscripts/build/lb_source_tar28
1 files changed, 22 insertions, 6 deletions
diff --git a/scripts/build/lb_source_tar b/scripts/build/lb_source_tar
index 4d45e2c21..56c5ec7cb 100755
--- a/scripts/build/lb_source_tar
+++ b/scripts/build/lb_source_tar
@@ -50,15 +50,31 @@ Check_lockfile .lock
Create_lockfile .lock
# Remove old source
-rm -f source.debian.tar.gz
-rm -f source.debian-live.tar.gz
+rm -f source.debian.tar.bz2 source.debian.tar.gz source.debian.tar.lz source.debian.tar
+rm -f source.debian-live.tar.bz2 source.debian-live.tar.gz source.debian-live.tar.lz source.debian-live.tar
-# Create tarballs
tar cf source.debian.tar source/debian
-gzip ${GZIP_OPTIONS} source.debian.tar
-
tar cf source.debian-live.tar source/debian-live
-gzip ${GZIP_OPTIONS} source.debian-live.tar
+
+case "${_COMPRESSION}" in
+ bzip2)
+ bzip2 ${BZIP2_OPTIONS} source.debian.tar
+ bzip2 ${BZIP2_OPTIONS} source.debian-live.tar
+ ;;
+
+ gzip)
+ gzip ${GZIP_OPTIONS} source.debian.tar
+ gzip ${GZIP_OPTIONS} source.debian-live.tar
+ ;;
+
+ lzip)
+ lzip ${LZIP_OPTIONS} source.debian.tar
+ lzip ${LZIP_OPTIONS} source.debian-live.tar
+ ;;
+
+ none)
+ ;;
+esac
# Creating stage file
Create_stagefile .stage/source_tar