3 ## live-build(7) - System Build Scripts
4 ## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && .
"${LIVE_BUILD}/scripts/build.sh" || .
/usr
/lib
/live
/build.sh
16 # Setting static variables
17 DESCRIPTION
="$(Echo 'build zsync control files')"
19 USAGE
="${PROGRAM} [--force]"
23 # Reading configuration files
24 Read_conffiles config
/all config
/common config
/bootstrap config
/chroot config
/binary config
/source
27 if [ "${LIVE_IMAGE_TYPE}" != "iso" ] && [ "${LIVE_IMAGE_TYPE}" != "iso-hybrid" ]
32 if [ "${LB_ZSYNC}" != "true" ]
37 Echo_message
"Begin building zsync control files..."
39 # Requiring stage file
40 Require_stagefile .build
/config .build
/bootstrap
43 Check_stagefile .build
/binary_zsync
52 Check_package chroot
/usr
/bin
/zsyncmake zsync
55 Restore_cache cache
/packages.binary
60 case "${LIVE_IMAGE_TYPE}" in
62 _IMAGES
="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.iso"
66 _IMAGES
="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.hybrid.iso"
70 _IMAGES
="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.img"
74 _IMAGES
="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar*"
78 _IMAGES
="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar*"
82 for _IMAGE
in ${_IMAGES}
86 case "${LB_BUILD_WITH_CHROOT}" in
89 Chroot chroot
"zsyncmake -C -b 2048 -u ${_IMAGE} ${_IMAGE}"
90 mv chroot
/${_IMAGE} chroot
/${_IMAGE}.zsync .
/
94 zsyncmake
-C -b 2048 -u "${_IMAGE}" "${_IMAGE}"
98 case "${LB_COMPRESSION}" in
100 bzip2 ${BZIP2_OPTIONS} ${_IMAGE}.zsync
104 gzip ${GZIP_OPTIONS} ${_IMAGE}.zsync
108 lzip
${LZIP_OPTIONS} ${_IMAGE}.zsync
112 xz
${XZ_OPTIONS} ${_IMAGE}.zsync
124 Save_cache cache
/packages.binary
129 # Creating stage file
130 Create_stagefile .build
/binary_zsync