diff options
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/binary_grub-efi | 60 | ||||
-rwxr-xr-x | scripts/build/binary_loadlin | 29 | ||||
-rwxr-xr-x | scripts/build/binary_package-lists | 32 | ||||
-rwxr-xr-x | scripts/build/binary_syslinux | 41 | ||||
-rwxr-xr-x | scripts/build/binary_win32-loader | 16 | ||||
-rwxr-xr-x | scripts/build/chroot_package-lists | 45 |
6 files changed, 58 insertions, 165 deletions
diff --git a/scripts/build/binary_grub-efi b/scripts/build/binary_grub-efi index 6d158cd4f..d24532d50 100755 --- a/scripts/build/binary_grub-efi +++ b/scripts/build/binary_grub-efi @@ -45,56 +45,11 @@ Check_architectures amd64 i386 Check_crossarchitectures # Checking depends -case "${LB_BUILD_WITH_CHROOT}" in - true) - _CHROOT_DIR="" - - Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin - Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin - Check_package chroot /usr/bin/grub-mkimage grub-common - Check_package chroot /usr/bin/mcopy mtools - Check_package chroot /sbin/mkfs.msdos dosfstools - ;; - - false) - _CHROOT_DIR="chroot" - - if [ ! -e /usr/lib/grub/x86_64-efi ] - then - # grub-efi-amd64-bin - Echo_error "/usr/lib/grub/x86_64-efi - no such directory" - exit 1 - fi - - if [ ! -e /usr/lib/grub/i386-efi ] - then - # grub-efi-ia32-bin - Echo_error "/usr/lib/grub/i386-efi - no such directory" - exit 1 - fi - - if [ ! -e /usr/bin/grub-mkimage ] - then - # grub-common - Echo_error "/usr/bin/grub-mkimage - no such file." - exit 1 - fi - - if [ ! -e /usr/bin/mcopy ] - then - # mtools - Echo_error "/usr/bin/mcopy - no such file." - exit 1 - fi - - if [ ! -e /sbin/mkfs.msdos ] - then - # dosfstools - Echo_error "/sbin/mkfs.msdos - no such file." - exit 1 - fi - ;; -esac +Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin +Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin +Check_package chroot /usr/bin/grub-mkimage grub-common +Check_package chroot /usr/bin/mcopy mtools +Check_package chroot /sbin/mkfs.msdos dosfstools # Setting destination directory case "${LIVE_IMAGE_TYPE}" in @@ -125,6 +80,11 @@ case "${LB_BUILD_WITH_CHROOT}" in mkdir -p chroot/${LIVE_BUILD_PATH} cp "${LIVE_BUILD_PATH}/efi-image" "chroot/${LIVE_BUILD_PATH}" cp "${LIVE_BUILD_PATH}/grub-cpmodules" "chroot/${LIVE_BUILD_PATH}" + + _CHROOT_DIR="" + ;; + false) + _CHROOT_DIR="chroot" ;; esac ##### diff --git a/scripts/build/binary_loadlin b/scripts/build/binary_loadlin index 69f740beb..d74a47021 100755 --- a/scripts/build/binary_loadlin +++ b/scripts/build/binary_loadlin @@ -43,19 +43,20 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock + case "${LB_ARCHITECTURES}" in amd64|i386) - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Checking depends - Check_package chroot /usr/lib/loadlin/loadlin.exe.gz loadlin + # Checking depends + Check_package chroot /usr/lib/loadlin/loadlin.exe.gz loadlin - # Restoring cache - Restore_cache cache/packages.binary + # Restoring cache + Restore_cache cache/packages.binary - # Installing depends - Install_package + # Installing depends + Install_package + case "${LB_BUILD_WITH_CHROOT}" in + true) _PREFIX="chroot" ;; @@ -69,15 +70,11 @@ case "${LB_ARCHITECTURES}" in gunzip -c "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" > binary/tools/loadlin.exe gunzip -c "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" > binary/tools/loadlin.txt - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Saving cache - Save_cache cache/packages.binary + # Saving cache + Save_cache cache/packages.binary - # Removing depends - Remove_package - ;; - esac + # Removing depends + Remove_package cat > binary/install/install.bat << EOF \tools\loadlin.exe vmlinuz initrd=initrd.gz diff --git a/scripts/build/binary_package-lists b/scripts/build/binary_package-lists index dcbadccb5..a13491ee3 100755 --- a/scripts/build/binary_package-lists +++ b/scripts/build/binary_package-lists @@ -55,23 +55,13 @@ if ls config/package-lists/*.list > /dev/null 2>&1 || \ then # Check depends Check_package host /usr/bin/apt-ftparchive apt-utils + Check_package chroot /usr/bin/grep-aptavail dctrl-tools - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Restoring cache - Restore_cache cache/packages.chroot + # Restoring cache + Restore_cache cache/packages.chroot - # Check depends - Check_package chroot /usr/bin/grep-aptavail dctrl-tools - - # Installing depends - Install_package - ;; - - false) - Check_package host /usr/bin/grep-aptavail dctrl-tools - ;; - esac + # Installing depends + Install_package if [ -e "${LIVE_BUILD}/share/bin/Packages" ] then @@ -163,15 +153,11 @@ then rm -rf chroot/binary.deb mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Removing depends - Remove_package + # Removing depends + Remove_package - # Saving cache - Save_cache cache/packages.chroot - ;; - esac + # Saving cache + Save_cache cache/packages.chroot # Creating stage file Create_stagefile .build/binary_package-lists diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux index 1347aa20b..bb6658826 100755 --- a/scripts/build/binary_syslinux +++ b/scripts/build/binary_syslinux @@ -114,42 +114,13 @@ else fi # Checking depends -case "${LB_BUILD_WITH_CHROOT}" in - true) - Check_package chroot /usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z]) ${_BOOTLOADER} - Check_package chroot /usr/lib/syslinux syslinux-common - - if ls "${_SOURCE}"/*.svg* > /dev/null 2>&1 - then - Check_package chroot /usr/bin/rsvg-convert librsvg2-bin - fi - ;; +Check_package chroot /usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z]) ${_BOOTLOADER} +Check_package chroot /usr/lib/syslinux syslinux-common - false) - if [ ! -e "/usr/share/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])" ] - then - Echo_error "/usr/share/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])" - exit 1 - fi - - if [ ! -e /usr/lib/syslinux ] - then - # syslinux-common - Echo_error "/usr/lib/syslinux - no such directory" - exit 1 - fi - - if ls "${_SOURCE}"/*.svg* > /dev/null 2>&1 - then - if [ ! -e /usr/bin/rsvg-convert ] - then - # librsvg2-bin - Echo_error "/usr/bin/rsvg-convert - no such file" - exit 1 - fi - fi - ;; -esac +if ls "${_SOURCE}"/*.svg* > /dev/null 2>&1 +then + Check_package chroot /usr/bin/rsvg-convert librsvg2-bin +fi # Restoring cache Restore_cache cache/packages.binary diff --git a/scripts/build/binary_win32-loader b/scripts/build/binary_win32-loader index eecb6b263..710587283 100755 --- a/scripts/build/binary_win32-loader +++ b/scripts/build/binary_win32-loader @@ -55,17 +55,17 @@ esac case "${LB_ARCHITECTURES}" in amd64|i386) - if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] - then - # Checking depends - Check_package chroot /usr/share/win32/win32-loader.exe win32-loader + # Checking depends + Check_package chroot /usr/share/win32/win32-loader.exe win32-loader - # Restoring cache - Restore_cache cache/packages.binary + # Restoring cache + Restore_cache cache/packages.binary - # Installing depends - Install_package + # Installing depends + Install_package + if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] + then # Copying win32-loader cp -r chroot/usr/share/win32/* binary else diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists index d64fe49e0..26a24061d 100755 --- a/scripts/build/chroot_package-lists +++ b/scripts/build/chroot_package-lists @@ -49,26 +49,14 @@ then exit 0 fi -case "${LB_BUILD_WITH_CHROOT}" in - true) - # Checking depends - Check_package chroot /usr/bin/grep-aptavail dctrl-tools - - # Restoring cache - Restore_cache cache/packages.chroot - - # Installing depends - Install_package - ;; - - false) - if [ ! -e /usr/bin/grep-aptavail ]; then - # dctrl-tools - Echo_error "/usr/bin/grep-aptavail - no such file." - exit 1 - fi - ;; -esac +# Checking depends +Check_package chroot /usr/bin/grep-aptavail dctrl-tools + +# Restoring cache +Restore_cache cache/packages.chroot + +# Installing depends +Install_package if [ -e "${LIVE_BUILD}/share/bin/Packages" ] then @@ -102,19 +90,10 @@ done rm -f chroot/bin/Packages -case "${LB_BUILD_WITH_CHROOT}" in - true) - # Removing dctrl-tools again if the user has not installed it - if ! grep -qs dctrl-tools chroot/root/packages.chroot - then - # Removing depends - Remove_package - fi - - # Saving cache - Save_cache cache/packages.chroot - ;; -esac +Remove_package + +# Saving cache +Save_cache cache/packages.chroot # Creating stage file Create_stagefile .build/chroot_package-lists.${_PASS} |