diff options
author | Daniel Baumann <daniel@debian.org> | 2011-01-02 00:36:20 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:20:40 +0100 |
commit | 21815cb707e78ed1899c74c09503cc5b696383e6 (patch) | |
tree | 9d2bdd949f2e5e08556b6570316d99cb15910550 /scripts/build/lb_binary_net | |
parent | 8c19e13179e0bb298adb28d84fb778a717be1fad (diff) | |
download | vyos-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_net')
-rwxr-xr-x | scripts/build/lb_binary_net | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/scripts/build/lb_binary_net b/scripts/build/lb_binary_net index 8ec5950b4..fd2770ebe 100755 --- a/scripts/build/lb_binary_net +++ b/scripts/build/lb_binary_net @@ -29,7 +29,7 @@ then exit 0 fi -if [ "${LB_NET_TARBALL}" = "none" ] +if [ "${LB_NET_TARBALL}" = "false" ] then exit 0 fi @@ -115,12 +115,11 @@ then fi # Remove old binary -rm -f binary-net.tar.bz2 -rm -f binary-net.tar.gz -rm -f binary-net.tar +rm -f binary-net.tar.bz2 binary-net.tar.gz binary-net.tar.lz binary-net.tar # Creating image file ROOT_DIR=$(basename ${LB_NET_ROOT_PATH}) + if [ "${ROOT_DIR}" = "chroot" ] then mv chroot chroot.tmp @@ -135,18 +134,22 @@ mkdir binary.tmp mv ${ROOT_DIR} tftpboot binary.tmp cd binary.tmp -case "${LB_NET_TARBALL}" in +tar cf ../binary-net.tar * + +case "${_COMPRESSION}" in bzip2) - tar cfj ../binary-net-tar.bz2 * + bzip2 ${BZIP2_OPTIONS} ../binary-net.tar ;; gzip) - tar cf ../binary-net.tar * gzip ${GZIP_OPTIONS} ../binary-net.tar ;; - tar) - tar cf ../binary-net.tar * + lzip) + lzip ${LZIP_OPTIONS} ../binary-net.tar + ;; + + none) ;; esac |