summaryrefslogtreecommitdiff
path: root/scripts/build/lb_binary_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_binary_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_binary_tar')
-rwxr-xr-xscripts/build/lb_binary_tar20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/build/lb_binary_tar b/scripts/build/lb_binary_tar
index 3e89bd74f..183b67f89 100755
--- a/scripts/build/lb_binary_tar
+++ b/scripts/build/lb_binary_tar
@@ -44,10 +44,26 @@ Check_lockfile .lock
Create_lockfile .lock
# Remove old binary
-rm -f binary.tar.gz
+rm -f binary.tar.bz2 binary.tar.gz binary.tar.lz binary.tar
tar cf binary-tar.tar binary
-gzip ${GZIP_OPTIONS} binary-tar.tar
+
+case "${_COMPRESSION}" in
+ bzip2)
+ bzip2 ${BZIP2_OPTIONS} binary-tar.tar
+ ;;
+
+ gzip)
+ gzip ${GZIP_OPTIONS} binary-tar.tar
+ ;;
+
+ lzip)
+ lzip ${LZIP_OPTIONS} binary-tar.tar
+ ;;
+
+ none)
+ ;;
+esac
# Creating stage file
Create_stagefile .stage/binary_tar