summaryrefslogtreecommitdiff
path: root/scripts/build/lb_source_net
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_net
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_net')
-rwxr-xr-xscripts/build/lb_source_net24
1 files changed, 18 insertions, 6 deletions
diff --git a/scripts/build/lb_source_net b/scripts/build/lb_source_net
index aa425c424..319d2a625 100755
--- a/scripts/build/lb_source_net
+++ b/scripts/build/lb_source_net
@@ -49,14 +49,26 @@ Check_lockfile .lock
Create_lockfile .lock
# Remove old source
-if [ -f source-net.tar.gz ]
-then
- rm -f source-net.tar.gz
-fi
+rm -f source-net.tar.bz2 source-net.tar.gz source-net.tar.lz source-net.tar
-# Create tarball
tar cf source-net.tar source
-gzip ${GZIP_OPTIONS} source-net.tar
+
+case "${_COMPRESSION}" in
+ bzip2)
+ bzip2 ${BZIP2_OPTIONS} source-net.tar
+ ;;
+
+ gzip)
+ gzip ${GZIP_OPTIONS} source-net.tar
+ ;;
+
+ lzip)
+ lzip ${LZIP_OPTIONS} source-net.tar
+ ;;
+
+ none)
+ ;;
+esac
# Creating stage file
Create_stagefile .stage/source_net