summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_net
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-02-26 19:57:41 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:36:13 +0100
commit0c9fc8846d35fff3aa82b80af282cc1aa0c035f3 (patch)
tree69c904a3e4832b505f791e7c7c2d7aa737e25d70 /helpers/lh_binary_net
parent265e6360d78201256dee0a7b75d7612a21f42b4b (diff)
downloadlive-build-0c9fc8846d35fff3aa82b80af282cc1aa0c035f3.zip
live-build-0c9fc8846d35fff3aa82b80af282cc1aa0c035f3.tar.gz
Adding option to set binary-net compression (or disable it).
Diffstat (limited to 'helpers/lh_binary_net')
-rwxr-xr-xhelpers/lh_binary_net32
1 files changed, 26 insertions, 6 deletions
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index 3eb8b67..8cd4bf7 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -38,6 +38,11 @@ then
exit 0
fi
+if [ "${LH_NET_TARBALL}" = "none" ]
+then
+ exit 0
+fi
+
Echo_message "Begin building binary netboot image..."
# Requiring stage file
@@ -53,10 +58,9 @@ Check_lockfile .lock
Create_lockfile .lock
# Remove old binary
-if [ -f binary-net.tar.gz ]
-then
- rm -f binary-net.tar.gz
-fi
+rm -f binary-net.tar.bz2
+rm -f binary-net.tar.gz
+rm -f binary-net.tar
# Creating image file
ROOT_DIR=$(basename ${LH_NET_ROOT_PATH})
@@ -71,8 +75,24 @@ then
fi
cd ..
-tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
-mv binary-net.tar.gz "${OLDPWD}"
+
+case "${LH_NET_TARBALL}" in
+ bzip2)
+ tar cfj binary-net-tar.bz2 "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
+ mv binary-net.tar.bz2 "${OLDPWD}"
+ ;;
+
+ gzip)
+ tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
+ mv binary-net.tar.gz "${OLDPWD}"
+ ;;
+
+ tar)
+ tar cf binary-net.tar "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
+ mv binary-net.tar "${OLDPWD}"
+ ;;
+esac
+
cd "${OLDPWD}"
if [ "${ROOT_DIR}" != "binary" ]